ObjectInputStream.read

ObjectInputStream.read

Class Overview | Class Members | This Package | All Packages

Syntax 1
public 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.
Overrides
read in class InputStream



Syntax 2
public int read( byte data[], int offset, int length ) 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.
Overrides
read in class InputStream