Reads a byte from the stream, and (conceptually) converts it to an int, masks it with
0xff
in order to strip off any sign-extension bits, and returns it as a
byte
value.
Thus, byte values between 0x00
and 0x7f
are simply returned as integer values between 0
and 127
. Values between 0x80
and 0xff
, which normally represent negative byte
values, will be mapped into positive integers between 128
and 255
.
The bit offset within the stream is reset to zero before the read occurs.
@return an unsigned byte value from the stream.
@exception java.io.EOFException if the end of the stream is reached.
@exception IOException if an I/O error occurs.