50,528
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) throws IOException {
BufferedInputStream input1 = new BufferedInputStream(
new FileInputStream("D:/【03 编程兴趣】/1.txt"));
OutputStream output1 = new FileOutputStream("D:/【03 编程兴趣】/2.txt");
int r;
byte[] buffer = new byte[1000];
while ((r = input1.read(buffer, 0, 1000)) != -1) {
System.out.println(new String(buffer));
output1.write(buffer, 0, r);
}
}