IDataStream.readBytes

Overview | Methods | This Package | All Packages

IDataStream.readBytes

Reads the specified number of bytes from this stream into a byte array.

Syntax

public byte[] readBytes( int count )

public void readBytes( byte[] buffer, int index, int count )

Parameters

count

The number of bytes to read.

buffer

The array to read data into.

index

The starting index in the array.

Return Value

Returns a byte array containing the data that was read.

Exceptions

IOException thrown if an I/O error occurs or if the stream does not support reading.

EOFException thrown if the end of the stream is reached while reading the data.

Remarks

The current position is advanced by count bytes.

See Also   IByteStream.read, readToEnd, writeBytes