previous | start | next

Code to Read a Byte From Disk

FileInputStream inputStream = new FileInputStream("input.dat");
int next = inputStream.read();
byte b;
if (next != -1)
   b = (byte)next;

      ...

inputStream.close();



previous | start | next