import java.io.FileInputStream;标签:java,读取数据,FileInputStream,FileOutputStream,io,new,import,字节 From: https://www.cnblogs.com/zhaoshengfu/p/18090382
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
FileInputStream fileInputStream = new FileInputStream("E:\\itcast\\javaee\\5929.txt");
FileOutputStream fileOutputStream = new FileOutputStream("C:\\Users\\31339\\Desktop\\新建文件夹 (7)\\fileinput\\ithaeima");
byte[] b = new byte[1024];
int m;
while ((m = fileInputStream.read(b)) != -1) {
System.out.println(new String(b, 0, m));
}
fileOutputStream.close();
fileInputStream.close();
}
}