RandomAccessFile.readUnsignedShort

RandomAccessFile.readUnsignedShort

Class Overview | Class Members | This Package | All Packages

Syntax
public final int readUnsignedShort() throws IOException
Returns
the next two bytes of this file, interpreted as an unsigned 16-bit integer.
Description
Reads an unsigned 16-bit number from this file. This method reads two bytes from the file. If the bytes read, in order, are b1 and b2, where 0 <= b1, b2 <= 255, then the result is equal to:

This method blocks until the two bytes are read, the end of the stream is detected, or an exception is thrown.

Exceptions
EOFException if this file reaches the end before reading two bytes.
Exceptions
IOException if an I/O error occurs.