Adds an annotation to the list of annotations to be used when writing the next value.
Flushes data to the internal buffer and finalizes the Ion stream.
Returns the current depth of the writer.
Retrieves the serialized buffer as an array of octets. The buffer will be either a UTF-8 encoded buffer for Ion text or Ion binary. The buffer is not well-defined until close is invoked.
Specifies the list of annotations to be used when writing the next value. This clears the current annotations set for the next value.
Starts a container and positions the writer within that container.
Steps out of a container and positions the writer after the container.
Writes a Uint8Array as an Ion blob value.
The array to write, which may be null to write a null.blob.
Writes a boolean as an Ion bool value.
The boolean to write, which may be null to write a null.bool.
Writes a Uint8Array as an Ion clob value.
The array to write, which may be null to write a null.clob.
Writes the field name for a member of a struct.
Writes a number value as an Ion 32-bit binary float value.
The number to write, which may be null to write a null.float.
If the number cannot be represented exactly as a 32-bit binary floating point
value, an implementation may truncate or round the value.
Writes a number value as an Ion 64-bit binary float value.
The number to write, which may be null to write a null.float.
Writes a number value as an Ion int.
The number to write, which may be null to write a null.int.
If number is not an integer between the range specified by Number.MIN_SAFE_INTEGER
and Number.MAX_SAFE_INTEGER, an implementation may truncate or round the value.
Writes a string value as an Ion string.
The string to write, which may be null to write a null.string.
Writes a string value as an Ion symbol.
The string to write, which may be null to write a null.symbol.
Writes a reader's current value.
If there's no current value, this method does nothing. If the current value is a container, this method will stepIn() recursively, writing each nested value that it encounters.
It is illegal to call this method if this Writer is positioned within a Struct while the Reader is not.
Writes a reader's current value and all following values until the end of the current container.
If there's no current value then this method calls {@link next()} to get started. This method will stepIn() to containers recursively, writing each nested value that it encounters.
It is illegal to call this method if this Writer is positioned within a Struct while the Reader is not.
Serializes data in Ion text or binary format to an implementation defined buffer.