Package java.io
Class InputStream

Public Method read

abstract int read()

Throws:

int read(byte[] buf)

Throws:

int read(byte[] buf, int offset, int len)

Throws:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

read() method:

This method is abstract and has to be implemented in a subclass.

Reads the next byte from this input stream. The value byte is returned as an int in the range of 0 and 255. If no byte is available because the end of the stream is reached, the value -1 is retuned. This method blocks until input data is available.

read(byte[] buf) method:

Tries to read buf.length bytes into the buffer array buf. The actual number of bytes read is returned. Note that it might be smaller than buf.length, e.g. when the end of the stream has been reached. If the end of the stream has been reached and there is no more data to be read, -1 is retuned. This method blocks until data is available.

read(byte[] buf, int offset, int len) method:

Reads up to len bytes from this input stream into the buffer array buf, starting at the buffer offset offset. The actual number of bytes read is retuned. This number might be smaller then len. If the end of the stream has been reached and there is no more data to be read, -1 is returned.