标题: 关闭流问题? [打印本页] 作者: 崔陈喜 时间: 2012-5-15 01:47 标题: 关闭流问题? 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);