1.正常的写代码是:(但是这样读取中文会出现乱码的情况)
FileInputStream fis=null;
try {
fis= new FileInputStream("src/temp");
byte[]bytes=new byte[4];
int readData;
while((readData=fis.read(bytes))!=-1){
System.out.print(new String(bytes