previous
|
start
|
next
Reading a Single Character from a File in Binary Format
Use
read
method of
InputStream
class to read a single byte
returns the next byte as an int
or the integer -1 at end of file
InputStream in = . . .; int next = in.read(); byte b; if (next != -1) b = (byte) next;
previous
|
start
|
next