DataInputStream.readInt

DataInputStream.readInt

Class Overview | Class Members | This Package | All Packages

Syntax
public final int readInt() throws IOException
Returns
the next four bytes of this input stream, interpreted as an int.
Description
Reads a signed 32-bit integer from this data input stream. This method reads four bytes from the underlying input stream. If the bytes read, in order, are b1, b2, b3, and b4, where 0 <= b1, b2, b3, b4 <= 255, then the result is equal to:

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

Exceptions
EOFException if this input stream reaches the end before reading four bytes.
Exceptions
IOException if an I/O error occurs.
See Also
in