title: Java reading hex file
body: <p>As part of a larger program, I need to read values from a hex file and print the decimal values.
  It seems to be working fine; However all hex values ranging from 80 to 9f are giving wrong values.
  for example 80 hex gives a decimal value of 8364
  Please help.</p>
  
  <p>this is my code : </p>
  
  <pre><code>String filename = "pidno5.txt";
  FileInputStream ist = new FileInputStream("sb3os2tm1r01897.032");       
  BufferedReader istream = new BufferedReader(new InputStreamReader(ist));
  int b[]=new int[160];       
  for(int i=0;i&lt;160;i++)
      b[i]=istream.read();
  for(int i=0;i&lt;160;i++)
      System.out.print((b[i])+" ");
  </code></pre>