ObjectInput.read

ObjectInput.read

Interface Overview | Interface Members | This Package | All Packages

Syntax 1
public abstract int read() throws IOException
Returns
the byte read, or -1 if the end of the stream is reached.
Description
Reads a byte of data. This method will block if no input is available.

Exceptions
IOException If an I/O error has occurred.



Syntax 2
public abstract int read( byte b[] ) throws IOException
Parameters
b
the buffer into which the data is read
Returns
the actual number of bytes read, -1 is returned when the end of the stream is reached.
Description
Reads into an array of bytes. This method will block until some input is available.

Exceptions
IOException If an I/O error has occurred.



Syntax 3
public abstract int read( byte b[], int off, int len ) throws IOException
Parameters
b
the buffer into which the data is read
off
the start offset of the data
len
the maximum number of bytes read
Returns
the actual number of bytes read, -1 is returned when the end of the stream is reached.
Description
Reads into an array of bytes. This method will block until some input is available.

Exceptions
IOException If an I/O error has occurred.