Top Description Methods
com.amazon.ion.impl

public Interface _Private_IonWriter

extends IonWriter
Known Direct Implementers
com.amazon.ion.impl.bin.AbstractIonWriter, com.amazon.ion.impl.IonWriterUser
Imports
com.amazon.ion.IonCatalog, .IonWriter, java.io.IOException

NOT FOR APPLICATION USE!

Method Summary

Modifier and TypeMethod and Description
public IonCatalog
getCatalog()

Mostly for testing at this point, but could be useful public API.

public int

Returns:

int depth of container nesting
getDepth
()

Returns the current depth of containers the writer is at.

public boolean

Returns:

true if a field name has been set false otherwise
isFieldNameSet
()

Returns true if the field name has been set either through setFieldName or setFieldId.

public boolean
isStreamCopyOptimized()

Indicates whether the writer is stream copy optimized through writeValue(com.amazon.ion.IonReader).

public void
writeIonVersionMarker()

Write an Ion version marker symbol to the output.

Inherited from com.amazon.ion.IonWriter:
addTypeAnnotationclosefinishflushgetSymbolTableisInStructsetFieldNamesetFieldNameSymbolsetTypeAnnotationssetTypeAnnotationSymbolsstepInstepOutwriteBlobwriteBlobwriteBoolwriteClobwriteClobwriteDecimalwriteFloatwriteIntwriteIntwriteNullwriteNullwriteStringwriteSymbolwriteSymbolTokenwriteTimestampwriteTimestampUTCwriteValuewriteValuewriteValues

Method Detail

getCatalogback to summary
public IonCatalog getCatalog()

Mostly for testing at this point, but could be useful public API.

getDepthback to summary
public int getDepth()

Returns the current depth of containers the writer is at. This is 0 if the writer is at top-level.

Returns:int

int depth of container nesting

isFieldNameSetback to summary
public boolean isFieldNameSet()

Returns true if the field name has been set either through setFieldName or setFieldId. This is generally more efficient than calling getFieldName or getFieldId and checking the return type as it does not need to resolve the name through a symbol table. This returns false if the field name has not been set.

Returns:boolean

true if a field name has been set false otherwise

isStreamCopyOptimizedback to summary
public boolean isStreamCopyOptimized()

Indicates whether the writer is stream copy optimized through writeValue(com.amazon.ion.IonReader).

writeIonVersionMarkerback to summary
public void writeIonVersionMarker() throws IOException

Write an Ion version marker symbol to the output. This is the $ion_1_0 value currently (in later versions the number may change). In text output this appears as the text symbol. In binary this will be the symbol id if the writer is in a list, sexp or struct. If the writer is currently at the top level this will write the "magic cookie" value. Writing a version marker will reset the symbol table to be the system symbol table.