Constructs an empty output stream that uses the communicator's default encoding version and compact class format.
The communicator that provides the encoding version and class format.
Constructs an empty output stream.
Optional
encoding: EncodingVersionThe encoding version. null
is equivalent to encoding 1.1.
Optional
format: FormatTypeThe class format. null
is equivalent to FormatType.CompactFormat
.
Readonly
bufferGets the buffer containing the stream data.
Gets or sets the stream position.
Readonly
sizeGets the size of the stream.
Releases any data retained by encapsulations.
Ends the previous encapsulation.
Marks the end of an exception.
Computes the amount of data written since the previous call to startSize and writes that value at the saved position.
The saved position.
Marks the end of a slice for a class instance or user exception.
Marks the end of a class instance.
Expand the stream to accept more data.
The number of bytes to accommodate in the stream.
Indicates that the marshaling of a request or reply is finished.
The Uint8Array
containing the encoded request or reply
Returns whether the stream is empty.
True if no data has been written yet, false otherwise.
Prepares the internal buffer for writing to a socket.
The Uint8Array
containing the encoded request or reply.
Resizes the stream to a new size.
The new size of the stream in bytes.
Writes the start of an encapsulation to the stream.
Writes the end of an encapsulation to the stream.
The encoding version of the encapsulation.
Optional
format: FormatTypeThe class format of the encapsulation. If not specified, the OutputStream's class format is used.
Marks the start of an exception.
Returns the current position and allocates four bytes for a fixed-length (32-bit) size value.
The current position.
Marks the start of a new slice for a class instance or user exception.
The Slice type ID corresponding to this slice.
The Slice compact type ID corresponding to this slice or -1 if no compact ID is defined for the type ID.
True if this is the last slice, false otherwise.
Marks the start of a class instance.
Preserved slices for this instance, or null
.
Swaps the contents of this stream with another.
The other stream.
Writes a blob of bytes to the stream.
The blob of bytes to write.
Writes a boolean to the stream.
The boolean to write to the stream.
Writes a byte to the stream.
The byte to write to the stream.
Writes a byte sequence to the stream.
Optional
v: Uint8ArrayThe byte sequence to write to the stream. Passing null
causes an empty sequence to be written
to the stream.
Writes a double to the stream.
The double to write to the stream.
Writes an empty encapsulation using the given encoding version.
The encoding version of the encapsulation.
Writes a pre-encoded encapsulation to the stream.
The encapsulation data.
Writes an enumerated value.
The enumerator to write to the stream.
Writes a user exception to the stream.
The user exception to write.
Writes a float to the stream.
The float to write to the stream.
Writes an integer to the stream.
The integer to write to the stream.
Writes a long to the stream.
The long to write to the stream.
Write the header information for an optional value.
The numeric tag associated with the value.
The optional format of the value.
Writes an optional proxy to the stream.
The optional tag.
Optional
v: ObjectPrxThe proxy to write, or undefined
if the optional proxy is not present.
Writes the state of Slice classes whose index was previously written with writeValue() to the stream.
Writes a short to the stream.
The short to write to the stream.
Writes a size to the stream.
The size to write.
Writes a string to the stream.
The string to write to the stream. Passing null
causes an empty string to be written to the
stream.
Writes a class instance to the stream. This method writes the index of an instance; the state of the value is written once OutputStream.writePendingValues is called.
The value to write.
The OutputStream class provides methods for encoding data using Slice encoding into a stream of bytes.