aa
package AFile; import java.io.*; //缓冲区的复制 public class Demo5_BufferCopy { public static void main(String[] args) throws IOException { FileInputStream fis = new FileInputStream("111.txt");//创建输入流对象,关联111.txt FileOutputStream fos = new FileOutputStream("copy.txt");//创建输出流对象,关联copy.txt BufferedInputStream bis = new BufferedInputStream(fis);///创建建缓冲区对象,对输入流进行包装让其更加强大 BufferedOutputStream bos = new BufferedOutputStream(fos); int b; while((b=bis.read())!=-1){ bos.write(b); } bis.close(); bos.close(); } }