Top Inners Fields Constructors Methods
com.amazon.ion.impl

pack-priv final Class IonWriterSystemBinary

extends IonWriterSystem
implements _Private_ListWriter
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl._Private_ListWriter, com.amazon.ion.IonWriter, com.amazon.ion.facet.Faceted, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable
Static Imports
com.amazon.ion.impl._Private_IonConstants.tidDATAGRAM, ._Private_IonConstants.tidList, ._Private_IonConstants.tidSexp, ._Private_IonConstants.tidStruct, com.amazon.ion.impl.lite._Private_LiteDomTrampoline.reverseEncode

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
IonWriterSystemBinary.PatchedValues

Implements patching of the internal OutputStream with actual value lengths and types.

Field Summary

Modifier and TypeField and Description
private final boolean
_auto_flush

Do we flush() after each top-level value?

private boolean
_closed

Ensure we don't use a closed output stream.

pack-priv boolean
pack-priv IonBinary.BufferManager
pack-priv IonWriterSystemBinary.PatchedValues
pack-priv int
pack-priv boolean[]
pack-priv int[]
pack-priv int[]
pack-priv int[]
pack-priv int
pack-priv SymbolTable[]
pack-priv int[]
pack-priv int[]
pack-priv int
private int
_user_depth

This is the depth as seen by the user.

private final OutputStream
pack-priv IonBinary.Writer
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
pack-priv static final int
Inherited from com.amazon.ion.impl.IonWriterSystem:
_default_system_symbol_table

Constructor Summary

AccessConstructor and Description
pack-priv
IonWriterSystemBinary(SymbolTable defaultSystemSymtab, OutputStream
OutputStream the users output byte stream, if specified
out
,
boolean
when true the writer flushes to the output stream between top level values
autoFlush
,
boolean
when true, an initial IVM will be emitted even when the user doesn't explicitly write one. When false, an initial IVM won't be emitted unless the user does it. That can result in an invalid Ion stream if not used carefully.
ensureInitialIvm
)

Method Summary

Modifier and TypeMethod and Description
protected final boolean
public final void
close()

Implements com.amazon.ion.IonWriter.close.

Closes this stream and releases any system resources associated with it.

private final void
public void
finish()

Overrides com.amazon.ion.impl.IonWriterSystem.finish.

Implements com.amazon.ion.IonWriter.finish.

Indicates that writing is completed and all buffered data should be written and flushed as if this were the end of the Ion data stream.

public final void
flush()

Implements com.amazon.ion.IonWriter.flush.

Flushes this writer by writing any buffered output to the underlying output target without finalizing the stream's local symbol table.

protected final IonType
public final int
getDepth()

Implements abstract com.amazon.ion.impl._Private_IonWriterBase.getDepth.

Returns the current depth of containers the writer is at.

pack-priv final OutputStream
pack-priv final SymbolTable
inject_local_symbol_table()

Overrides com.amazon.ion.impl.IonWriterSystem.inject_local_symbol_table.

Builds a new local symbol table from the current contextual symtab (a system symtab).

public final boolean
isInStruct()

Implements com.amazon.ion.IonWriter.isInStruct.

Determines whether values are being written as fields of a struct.

private final int
private final void
startValue(int value_type)

public final void
stepIn(IonType containerType)

Implements com.amazon.ion.IonWriter.stepIn.

Writes the beginning of a non-null container (list, sexp, or struct).

public final void
stepOut()

Implements com.amazon.ion.IonWriter.stepOut.

Writes the end of the current container, returning this writer to the context of parent container.

private final boolean
private final int
private final int
protected int
private void
writeAllBufferedData()

Empty our buffers, assuming it is safe to do so.

public void
writeBlob(byte[]
bytes to be written. May be null to represent null.blob.
value
,
int
offset of the first byte in value to write
start
,
int
number of bytes to write from value
len
)

Implements com.amazon.ion.IonWriter.writeBlob.

Writes a portion of the byte array out as an IonBlob value.

public void
writeBool(boolean
true or false as desired
value
)

Implements com.amazon.ion.IonWriter.writeBool.

writes a non-null boolean value (true or false) as an IonBool to output.

public void
pack-priv int
writeBytes(OutputStream userstream)

Writes everything we've got into the output stream, performing all necessary patches along the way.

public void
writeClob(byte[]
bytes to be written. May be null to represent null.clob.
value
,
int
offset of the first byte in value to write
start
,
int
number of bytes to write from value
len
)

Implements com.amazon.ion.IonWriter.writeClob.

Writes a portion of the byte array out as an IonClob value.

public void
writeDecimal(BigDecimal
may be null to represent null.decimal.
value
)

Implements abstract com.amazon.ion.impl._Private_IonWriterBase.writeDecimal.

Implements com.amazon.ion.IonWriter.writeDecimal.

Writes a BigDecimal value as an Ion decimal.

public void
writeFloat(double
double to write
value
)

Implements com.amazon.ion.IonWriter.writeFloat.

writes a 64 bit binary floating point value, a Java double, as an IonFloat.

public void
public void
public void
writeInt(long
signed int to write
value
)

Implements com.amazon.ion.IonWriter.writeInt.

writes a signed 64 bit value, a Java long, as an IonInt.

public void
writeInt(BigInteger
BigInteger to write
value
)

Implements com.amazon.ion.IonWriter.writeInt.

writes a BigInteger value as an IonInt.

public void
public void
public void
public void
pack-priv void
writeIonVersionMarkerAsIs(SymbolTable systemSymtab)

Implements abstract com.amazon.ion.impl.IonWriterSystem.writeIonVersionMarkerAsIs.

Writes an IVM without checking preconditions or InitialIVMHandling.

pack-priv void
public void
writeNull(IonType
type of the null to be written
type
)

Implements com.amazon.ion.IonWriter.writeNull.

Writes a null value of a specified Ion type.

public void
writeRaw(byte[] value, int start, int len)

pack-priv int
public void
writeString(String
may be null to represent null.string.
value
)

Implements com.amazon.ion.IonWriter.writeString.

Writes a java.lang.String as an Ion string.

public void
pack-priv void
writeSymbolAsIs(int symbolId)

Implements abstract com.amazon.ion.impl.IonWriterSystem.writeSymbolAsIs.

Writes a symbol without checking for system ID.

public void
writeSymbolAsIs(String value)

Implements abstract com.amazon.ion.impl.IonWriterSystem.writeSymbolAsIs.

Writes a symbol without checking for system ID.

public void
writeTimestamp(Timestamp
may be null to represent null.timestamp.
value
)

Implements com.amazon.ion.IonWriter.writeTimestamp.

Writes a timestamp value.

protected int
Inherited from com.amazon.ion.impl.IonWriterSystem:
add_symboladdTypeAnnotationannotationCountasFacetassumeFieldNameSymbolassumeKnownSymbolclearAnnotationsclearFieldNameendValueensureAnnotationCapacityfindAnnotationgetDefaultSystemSymtabgetFieldIdgetSymbolTablegetTypeAnnotationIdsgetTypeAnnotationsgetTypeAnnotationSymbolshasAnnotationsinternAnnotationsAndGetSidsisFieldNameSetsetFieldNamesetFieldNameSymbolsetSymbolTablesetTypeAnnotationssetTypeAnnotationSymbolsshouldWriteIvmstartValuewriteIonVersionMarkerwriteIonVersionMarkerwriteSymbolwriteSymbol