1.流为FileInputStream
FileInputStream fileInputStream = new FileInputStream("D:/a.txt");
byte[] b = new byte[1024];
int i = 0;
while ((i = fileInputStream.read(b)) != -1) {
String str = new String(b);
System.out.print(str);
}
2.流为InputStream
byte[] bytes = FileCopyUtils.copyToByteArray("这里写InputStream");
String str = new String(bytes, "UTF-8");