Top Fields Constructors Methods
com.amazon.ion.system

pack-priv abstract Class IonWriterBuilderBase<T extends IonWriterBuilderBase>

extends IonWriterBuilder
Class Inheritance
Known Direct Subclasses
com.amazon.ion.system.IonBinaryWriterBuilder, com.amazon.ion.system.IonTextWriterBuilder
Imports
com.amazon.ion.IonCatalog, .IonWriter, .SymbolTable

Field Summary

Modifier and TypeField and Description
private IonCatalog
private SymbolTable[]

Constructor Summary

AccessConstructor and Description
protected
IonWriterBuilderBase()

NOT FOR APPLICATION USE!

protected
IonWriterBuilderBase(IonWriterBuilderBase<T extends IonWriterBuilderBase> that)

NOT FOR APPLICATION USE!

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract T

Returns:

a new builder with the same configuration as this.
copy
()

Creates a mutable copy of this builder.

public final IonCatalog
getCatalog()

Gets the catalog to use when building an IonWriter.

public final SymbolTable[]

Returns:

may be null or empty.
getImports
()

Gets the imports that will be used to construct the initial local symbol table.

pack-priv abstract T

Returns:

this instance, if immutable; otherwise an immutable copy of this instance.
immutable
()

Returns an immutable builder configured exactly like this one.

pack-priv abstract T

Returns:

this instance, if mutable; otherwise a mutable copy of this instance.
mutable
()

Returns a mutable builder configured exactly like this one.

protected void
mutationCheck()

NOT FOR APPLICATION USE!

private static SymbolTable[]
safeCopy(SymbolTable[] imports)

public void
setCatalog(IonCatalog
the catalog to use in built writers. If null, the writer will be unable to resolve manually-written imports and may throw an exception.
catalog
)

Sets the catalog to use when building an IonWriter.

public void
setImports(SymbolTable...
a sequence of shared symbol tables. The first (and only the first) may be a system table.
imports
)

Sets the shared symbol tables that will be used to construct the initial local symbol table.

public T

Returns:

this instance, if mutable; otherwise a mutable copy of this instance.
withCatalog
(IonCatalog
the catalog to use in built writers. If null, the writer will be unable to resolve manually-written imports and may throw an exception.
catalog
)

Declares the catalog to use when building an IonWriter, returning a new mutable builder if this is immutable.

public T

Returns:

this instance, if mutable; otherwise a mutable copy of this instance.
withImports
(SymbolTable...
a sequence of shared symbol tables. The first (and only the first) may be a system table.
imports
)

Declares the imports to use when building an IonWriter, returning a new mutable builder if this is immutable.

Inherited from com.amazon.ion.system.IonWriterBuilder:
buildgetInitialIvmHandlinggetIvmMinimizing

Field Detail

myCatalogback to summary
private IonCatalog myCatalog
myImportsback to summary
private SymbolTable[] myImports

Constructor Detail

IonWriterBuilderBaseback to summary
protected IonWriterBuilderBase()

NOT FOR APPLICATION USE!

IonWriterBuilderBaseback to summary
protected IonWriterBuilderBase(IonWriterBuilderBase<T extends IonWriterBuilderBase> that)

NOT FOR APPLICATION USE!

Method Detail

copyback to summary
pack-priv abstract T copy()

Creates a mutable copy of this builder.

Returns:T

a new builder with the same configuration as this.

getCatalogback to summary
public final IonCatalog getCatalog()

Gets the catalog to use when building an IonWriter. The catalog is needed to resolve manually-written imports (not common). By default, this property is null.

See Also
setCatalog(IonCatalog), withCatalog(IonCatalog)
getImportsback to summary
public final SymbolTable[] getImports()

Gets the imports that will be used to construct the initial local symbol table.

Returns:SymbolTable[]

may be null or empty.

See Also
setImports(SymbolTable...), withImports(SymbolTable...)
immutableback to summary
pack-priv abstract T immutable()

Returns an immutable builder configured exactly like this one.

Returns:T

this instance, if immutable; otherwise an immutable copy of this instance.

mutableback to summary
pack-priv abstract T mutable()

Returns a mutable builder configured exactly like this one.

Returns:T

this instance, if mutable; otherwise a mutable copy of this instance.

mutationCheckback to summary
protected void mutationCheck()

NOT FOR APPLICATION USE!

safeCopyback to summary
private static SymbolTable[] safeCopy(SymbolTable[] imports)
setCatalogback to summary
public void setCatalog(IonCatalog catalog)

Sets the catalog to use when building an IonWriter.

Parameters
catalog:IonCatalog

the catalog to use in built writers. If null, the writer will be unable to resolve manually-written imports and may throw an exception.

Exceptions
UnsupportedOperationException:
if this is immutable.
See Also
getCatalog(), withCatalog(IonCatalog)
setImportsback to summary
public void setImports(SymbolTable... imports)

Sets the shared symbol tables that will be used to construct the initial local symbol table.

If the imports sequence is not null and not empty, the output stream will be bootstrapped with a local symbol table that uses the given imports.

Parameters
imports:SymbolTable[]

a sequence of shared symbol tables. The first (and only the first) may be a system table.

Exceptions
UnsupportedOperationException:
if this is immutable.
See Also
getImports(), withImports(SymbolTable...)
withCatalogback to summary
public T withCatalog(IonCatalog catalog)

Declares the catalog to use when building an IonWriter, returning a new mutable builder if this is immutable.

Parameters
catalog:IonCatalog

the catalog to use in built writers. If null, the writer will be unable to resolve manually-written imports and may throw an exception.

Returns:T

this instance, if mutable; otherwise a mutable copy of this instance.

See Also
getCatalog(), setCatalog(IonCatalog)
withImportsback to summary
public T withImports(SymbolTable... imports)

Declares the imports to use when building an IonWriter, returning a new mutable builder if this is immutable.

If the imports sequence is not null and not empty, the output stream will be bootstrapped with a local symbol table that uses the given imports.

Parameters
imports:SymbolTable[]

a sequence of shared symbol tables. The first (and only the first) may be a system table.

Returns:T

this instance, if mutable; otherwise a mutable copy of this instance.

See Also
getImports(), setImports(SymbolTable...)