try {
  InputStream is=new FileInputStream("C:\\Users\\admin\\Desktop\\临时\\3.txt");
  int read=is.read();
  int read1=is.read();
  int read2=is.read();
  System.out.println(read);
  System.out.println(read1);
  System.out.println(read2);
} catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }

 

try {
  InputStream is=new FileInputStream("C:\\Users\\admin\\Desktop\\临时\\3.txt");
  
  byte[] bytes=new byte[1024];
  int i=is.read(bytes);
  int len;
  for(int j=0;j<i;j++) {
    System.out.println(bytes[j]);
  }
} catch (IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
  }