read (Stream - Java)

Reads bytes from a stream.

Defined in

Stream

Syntax

public byte[] read()
    throws NotesException
public byte[] read(int length)
    throws NotesException

Parameters

int length

The number of bytes to read to a maximum of 2GB. Defaults to the number of bytes in the stream starting at the current position to a maximum of 2GB.

Return value

byte[]

The bytes read. The lower bound of the array is 0.

Usage

This method starts at getPosition and reads the number of bytes specified or the number of bytes left in the stream.

Example