Stream.readAll()

DESCRIPTION

Read an exact amount of bytes from a stream.

This function blocks until the bytes is read.

May throw a NabtoRuntimeException with one of the following error codes:

STOPPED if the stream is stopped.
OPERATION_IN_PROGRESS if another read is in progress.

DECLARATION

    public byte[] readAll(int length) throws NabtoEOFException

PARAMETERS

length:
The amount of bytes to read.

ERRORS

Throws the following exceptions:

None.

RETURN VALUES

Bytes read, less than length bytes can be returned if

EXAMPLES

None.