package com.itheima.output;
import java.io.*;
public class OutputDemo12 {
public static void main(String[] args) throws IOException {
BufferedInputStream bis=new BufferedInputStream(new FileInputStream(".\\a.txt"));
BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream(".\\copy.txt"));
byte[] bytes=new byte[1024];
int len;
while ((len= bis.read(bytes))!=-1){
bos.write(bytes,0,len);
}
bis.close();
bos.close();
}
}
85.BufferedInputStream缓冲流-一次读写一个字节数组__
最新推荐文章于 2024-01-01 09:24:20 发布