import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.IOException;public class Text{ public static void main(String[] args) throws IOException{ byte[] buf = new byte[1024]; FileInputStream input = new FileInputStream("D:\\Text\\Class\\Test.java"); BufferedInputStream bufferinput = new BufferedInputStream(input); FileOutputStream output = new FileOutputStream("D:\\Text\\new_test.txt"); BufferedOutputStream bufferoutput = new BufferedOutputStream(output); while( bufferinput.read(buf) != -1){ bufferoutput.write(buf,0,buf.length); } bufferoutput.flush(); bufferoutput.close(); output.close(); bufferinput.close(); input.close(); System.out.println("已结束!"); }}原文档是但输出只,读读到最后continue那,后面的分号及最后的几个}都没有,为什么?
添加回答
举报
0/150
提交
取消