java字节流复制文件


import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

//字节流复制文件
public class FileInputStream2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream = new FileInputStream("E:\\Workpace\\abc.txt");
        FileOutputStream fileOutputStream = new FileOutputStream("E:\\Workpace\\ccc.txt");
        int b;
        while((b = fileInputStream.read()) != -1){
            fileOutputStream.write(b);
        }
        fileInputStream.close();
        fileOutputStream.close();
    }
}


上一篇:无需 Root 使用 IDA 调试 Android Native


下一篇:IO流学习笔记