Position (NotesStream - JavaScript™)
Read-write. Offset from the beginning of the stream in bytes.
Defined in
NotesStreamSyntax
getPosition() : int
setPosition(position:int) : void
Usage
A value of 0 means the beginning of the stream.Setting this property to a negative value or a value greater than the size of the stream sets the position at end of stream.
write and writeText update this property to end of stream. Setting this property has no effect on these methods.
This property affects read and readText. You should exercise care setting a value other than 0. No special support exists for multi-byte characters.
Examples
This button writes the content of an item to a stream, then positions the stream to the beginning (0) before reading from it.var doc:NotesDocument = currentDocument.getDocument();
// Create stream and write text of Body item to it
var stream:NotesStream = session.createStream();
stream.writeText(doc.getItemValueString("body"));
// Reset position to beginning and read text
stream.setPosition(0);
requestScope.status = stream.readText();