| Modifier and Type | Field and Description |
|---|---|
| private final IonCatalog | _catalog
Used to construct new local symtabs. |
| private IonContainer | _current_parent
The container into which we are currently appending values. |
| private final ValueFactory | |
| private boolean | |
| private final int | |
| private final LocalSymbolTableAsStruct. | _lst_factory
Factory for constructing local symbol tables. |
| private IonContainer[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected | IonWriterSystemTree(SymbolTable
must not be null. defaultSystemSymbolTable, IonCatalog may be null. catalog, IonContainer must not be null. rootContainer, IonWriterBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements com. Closes this stream and releases any system resources associated with it. |
| public void | flush()
Implements com. Flushes this writer by writing any buffered output to the underlying output target without finalizing the stream's local symbol table. |
| protected IonValue | |
| protected IonType | |
| public int | getDepth()
Implements abstract com. Returns the current depth of containers the writer is at. |
| pack-priv final SymbolTable | inject_local_symbol_table()
Overrides com. Builds a new local symbol table from the current contextual symtab (a system symtab). |
| public boolean | isInStruct()
Implements com. Determines whether values are being written as fields of a struct. |
| private void | |
| private void | |
| public void | stepIn(IonType containerType)
Implements com. Writes the beginning of a non-null container (list, sexp, or struct). |
| public void | stepOut()
Implements com. Writes the end of the current container, returning this writer to the context of parent container. |
| public void | writeBlob(byte[]
bytes to be written.
May be value, int null to represent null.blob.offset of the first byte in value to write start, int number of bytes to write from value len)Implements com. Writes a portion of the byte array out as an IonBlob value. |
| public void | writeBool(boolean
true or false as desired value)Implements com. writes a non-null boolean value (true or false) as an IonBool to output. |
| public void | writeClob(byte[]
bytes to be written.
May be value, int null to represent null.clob.offset of the first byte in value to write start, int number of bytes to write from value len)Implements com. Writes a portion of the byte array out as an IonClob value. |
| public void | writeDecimal(BigDecimal
may be null to represent value)null.decimal.Implements abstract com. Implements com. Writes a BigDecimal value as an Ion decimal. |
| public void | writeFloat(double
double to write value)Implements com. writes a 64 bit binary floating point value, a Java double, as an IonFloat. |
| public void | |
| public void | writeInt(long
signed int to write value)Implements com. writes a signed 64 bit value, a Java long, as an IonInt. |
| public void | writeInt(BigInteger
BigInteger to write value)Implements com. writes a BigInteger value as an IonInt. |
| pack-priv void | writeIonVersionMarkerAsIs(SymbolTable systemSymtab)
Implements abstract com. Writes an IVM without checking preconditions or
|
| pack-priv void | |
| public void | writeNull(IonType
type of the null to be written type)Implements com. Writes a null value of a specified Ion type. |
| public void | writeString(String
may be null to represent value)null.string.Implements com. Writes a |
| pack-priv void | writeSymbolAsIs(int symbolId)
Implements abstract com. Writes a symbol without checking for system ID. |
| public void | writeSymbolAsIs(String value)
Implements abstract com. Writes a symbol without checking for system ID. |
| public void | writeTimestamp(Timestamp
may be null to represent value)null.timestamp.Implements com. Writes a timestamp value. |
| _catalog | back to summary |
|---|---|
| private final IonCatalog _catalog Used to construct new local symtabs. May be null | |
| _current_parent | back to summary |
|---|---|
| private IonContainer _current_parent The container into which we are currently appending values. Never null. | |
| _factory | back to summary |
|---|---|
| private final ValueFactory _factory | |
| _in_struct | back to summary |
|---|---|
| private boolean _in_struct | |
| _initialDepth | back to summary |
|---|---|
| private final int _initialDepth | |
| _lst_factory | back to summary |
|---|---|
| private final LocalSymbolTableAsStruct. Factory for constructing local symbol tables. Not null. | |
| _parent_stack | back to summary |
|---|---|
| private IonContainer[] _parent_stack | |
| _parent_stack_top | back to summary |
|---|---|
| private int _parent_stack_top | |
| IonWriterSystemTree | back to summary |
|---|---|
protected IonWriterSystemTree(SymbolTable defaultSystemSymbolTable, IonCatalog catalog, IonContainer rootContainer, IonWriterBuilder.
| |
| append | back to summary |
|---|---|
| private void append(IonValue value) | |
| close | back to summary |
|---|---|
| public void close() Implements com. Doc from com. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
If the cursor is between top-level values, this method will
In other words: unless you're recovering from a failure condition, don't close the writer until you've stepped-out back to the starting level. | |
| flush | back to summary |
|---|---|
| public void flush() Implements com. Doc from com. Flushes this writer by writing any buffered output to the underlying output target without finalizing the stream's local symbol table. For some implementations this may have no effect even when some data is buffered, because it's not always possible to fully write partial data. In particular, when writing binary Ion data, Ion's length-prefixed encoding requires a complete top-level value to be written at once.
If localSymbolTableAppend is enabled (see
| |
| get_root | back to summary |
|---|---|
| protected IonValue get_root() | |
| getContainer | back to summary |
|---|---|
| protected IonType getContainer() | |
| getDepth | back to summary |
|---|---|
| public int getDepth() Implements abstract com. Doc from com. Returns the current depth of containers the writer is at. This is 0 if the writer is at top-level.
| |
| inject_local_symbol_table | back to summary |
|---|---|
| pack-priv final SymbolTable inject_local_symbol_table() throws IOException Overrides com. Doc from com. Builds a new local symbol table from the current contextual symtab (a system symtab).
| |
| isInStruct | back to summary |
|---|---|
| public boolean isInStruct() Implements com. Doc from com. Determines whether values are being written as fields of a struct. This is especially useful when it is not clear whether field names need to be written or not.
| |
| popParent | back to summary |
|---|---|
| private void popParent() | |
| pushParent | back to summary |
|---|---|
private void pushParent(IonContainer newParent)
| |
| stepIn | back to summary |
|---|---|
| public void stepIn(IonType containerType) throws IOException Implements com. Doc from com. Writes the beginning of a non-null container (list, sexp, or struct).
This must be matched by a call to
This method is not used to write
| |
| stepOut | back to summary |
|---|---|
| public void stepOut() throws IOException Implements com. Doc from com. Writes the end of the current container, returning this writer to the
context of parent container.
Invocation of this method must match a preceding call to
| |
| writeBlob | back to summary |
|---|---|
| public void writeBlob(byte[] value, int start, int len) throws IOException Implements com. Doc from com. Writes a portion of the byte array out as an IonBlob value. This copies the portion of the byte array that is written.
| |
| writeBool | back to summary |
|---|---|
| public void writeBool(boolean value) throws IOException Implements com. Doc from com. writes a non-null boolean value (true or false) as an IonBool to output.
| |
| writeClob | back to summary |
|---|---|
| public void writeClob(byte[] value, int start, int len) throws IOException Implements com. Doc from com. Writes a portion of the byte array out as an IonClob value. This copies the porition of the byte array that is written.
| |
| writeDecimal | back to summary |
|---|---|
| public void writeDecimal(BigDecimal value) throws IOException Implements abstract com. Implements com. Doc from com. Writes a BigDecimal value as an Ion decimal. Ion uses an arbitrarily long sign/value and an arbitrarily long signed exponent to write the value. This preserves all of the BigDecimal digits, the number of significant digits.
To write a negative zero value, pass this method a
| |
| writeFloat | back to summary |
|---|---|
| public void writeFloat(double value) throws IOException Implements com. Doc from com. writes a 64 bit binary floating point value, a Java double, as an IonFloat. Currently IonFloat values are output as 64 bit IEEE 754 big endian values. IonFloat preserves all valid floating point values, including -0.0, Nan and +/-infinity. It does not guarantee preservation of -Nan or other less less "common" values.
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(int value) throws IOException | |
| writeInt | back to summary |
|---|---|
| public void writeInt(long value) throws IOException Implements com. Doc from com. writes a signed 64 bit value, a Java long, as an IonInt.
| |
| writeInt | back to summary |
|---|---|
| public void writeInt(BigInteger value) throws IOException Implements com. Doc from com. writes a BigInteger value as an IonInt. If the BigInteger value is null this writes a null int.
| |
| writeIonVersionMarkerAsIs | back to summary |
|---|---|
| pack-priv void writeIonVersionMarkerAsIs(SymbolTable systemSymtab) throws IOException Implements abstract com. Doc from com. Writes an IVM without checking preconditions or
| |
| writeLocalSymtab | back to summary |
|---|---|
| pack-priv void writeLocalSymtab(SymbolTable symtab) throws IOException Overrides com.
| |
| writeNull | back to summary |
|---|---|
| public void writeNull(IonType type) throws IOException Implements com. Doc from com. Writes a null value of a specified Ion type.
| |
| writeString | back to summary |
|---|---|
| public void writeString(String value) throws IOException Implements com. Doc from com. Writes a
| |
| writeSymbolAsIs | back to summary |
|---|---|
| pack-priv void writeSymbolAsIs(int symbolId) Implements abstract com. Doc from com. Writes a symbol without checking for system ID.
| |
| writeSymbolAsIs | back to summary |
|---|---|
| public void writeSymbolAsIs(String value) Implements abstract com. Doc from com. Writes a symbol without checking for system ID.
| |
| writeTimestamp | back to summary |
|---|---|
| public void writeTimestamp(Timestamp value) throws IOException Implements com. Doc from com. Writes a timestamp value.
| |