write (Stream - Java)

Associates a file with a stream.

Defined in

Stream

Syntax

public int write(byte[] buffer)
    throws NotesException

Parameters

byte[] buffer

Variant array. The bytes to write, to a maximum of 2GB.

Return value

int

The number of bytes written.

Usage

This method appends the bytes to the end of the stream.

This method throws an exception if the stream is read-only. See IsReadOnly.

When a stream is written, property values are:

  • Bytes is incremented by the number of bytes read
  • IsEOS is true
  • Position is set at end of stream

Example