public class BufferedDemo {
public static void main(String[] args) throws IOException {
BufferedInputStream bis = new BufferedInputStream(new FileInputStream("004.jpg"));
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("dest.jpg"));
int b;
while ((b = bis.read()) != -1)
bos.write(b);
bis.close();//如果我不关闭回怎样?
bos.close();//如果我不关闭回怎样?
}
}
|
|