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

public Class _Private_IonBinaryWriterBuilder

extends IonBinaryWriterBuilder
Class Inheritance
Known Direct Subclasses
com.amazon.ion.impl._Private_IonBinaryWriterBuilder.Mutable
Annotations
@SuppressWarnings:deprecation
Static Imports
com.amazon.ion.impl._Private_Utils.initialSymtab

NOT FOR APPLICATION USE!

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final _Private_IonManagedBinaryWriterBuilder
private SymbolTable
myInitialSymbolTable

System or local

private ValueFactory

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
public final IonWriter
build(OutputStream
the stream that will receive Ion data. Must not be null.
out
)

Implements abstract com.amazon.ion.system.IonWriterBuilder.build.

Builds a new writer based on this builder's configuration properties.

pack-priv SymbolTable
buildContextSymbolTable()

Returns a symtab usable in a local context.

public final IonBinaryWriter
buildLegacy()
Deprecated

private IonWriterSystemBinary
public final _Private_IonBinaryWriterBuilder
copy()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.copy.

Creates a mutable copy of this builder.

private _Private_IonBinaryWriterBuilder
fillDefaults()

Fills all properties and returns an immutable builder.

private _Private_IonBinaryWriterBuilder
fillLegacyDefaults()

Fills all properties and returns an immutable builder.

public SymbolTable
getInitialSymbolTable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.getInitialSymbolTable.

Gets the symbol table to use for encoded data.

public ValueFactory
public _Private_IonBinaryWriterBuilder
immutable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.immutable.

Returns an immutable builder configured exactly like this one.

public _Private_IonBinaryWriterBuilder
mutable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.mutable.

Returns a mutable builder configured exactly like this one.

public void
setAutoFlushEnabled(boolean autoFlushEnabled)

public void
setBlockSize(int size)

public void
setCatalog(final 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
)

Overrides com.amazon.ion.system.IonWriterBuilderBase.setCatalog.

Sets the catalog to use when building an IonWriter.

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

Overrides com.amazon.ion.system.IonWriterBuilderBase.setImports.

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

public void
setInitialSymbolTable(SymbolTable
must be a local or system symbol table. May be null, in which case the initial symtab is that of $ion_1_0.
symtab
)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setInitialSymbolTable.

Declares the symbol table to use for encoded data.

public void
setIsFloatBinary32Enabled(boolean
true to enable writing 4-byte floats, false to always write 8-byte floats.
enabled
)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setIsFloatBinary32Enabled.

Enables or disables writing Binary32 (4-byte, single precision, IEEE-754) values for floats when there would be no loss in precision.

public void
setLocalSymbolTableAppendEnabled(boolean enabled)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setLocalSymbolTableAppendEnabled.

Enables or disables writing local symbol tables that append symbols to the current symbol table.

public void
setStreamCopyOptimized(final boolean optimized)

Overrides com.amazon.ion.system.IonBinaryWriterBuilder.setStreamCopyOptimized.

Declares whether built writers may attempt to optimize IonWriter#writeValue(IonReader) by copying raw source data.

public void
public static _Private_IonBinaryWriterBuilder

Returns:

a new mutable builder.
standard
()

Hides com.amazon.ion.system.IonBinaryWriterBuilder.standard.

The standard builder of binary writers, with all configuration properties having their default values.

public _Private_IonBinaryWriterBuilder
withAutoFlushEnabled(boolean
A boolean parameter indicating whether this functionality is enabled or not.
autoFlushEnabled
)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withAutoFlushEnabled.

Auto-flush enables automatic execution of flush operations during the write process.

public _Private_IonBinaryWriterBuilder
withBlockSize(int
represent the specified block size in bytes. If this functionality is not set, the default block size is 32768 bytes.
size
)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withBlockSize.

Specify the block size for write buffer.

public _Private_IonBinaryWriterBuilder
withFloatBinary32Disabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Disabled.

Disables writing Binary32 (4-byte, single precision, IEEE-754) values for floats.

public _Private_IonBinaryWriterBuilder
withFloatBinary32Enabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Enabled.

Enables writing Binary32 (4-byte, single precision, IEEE-754) values for floats when there would be no loss in precision.

public _Private_IonBinaryWriterBuilder
withInitialSymbolTable(SymbolTable
may be null.
symtab
)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withInitialSymbolTable.

Defaults to $ion_1_0 if null.

public _Private_IonBinaryWriterBuilder
withLocalSymbolTableAppendDisabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendDisabled.

Disables writing local symbol tables that append symbols to the current symbol table.

public _Private_IonBinaryWriterBuilder
withLocalSymbolTableAppendEnabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendEnabled.

Enables writing local symbol tables that append symbols to the current symbol table.

public _Private_IonBinaryWriterBuilder
Inherited from com.amazon.ion.system.IonBinaryWriterBuilder:
getInitialIvmHandlinggetIvmMinimizingisStreamCopyOptimizedwithCatalogwithImportswithStreamCopyOptimized

Field Detail

myBinaryWriterBuilderback to summary
private final _Private_IonManagedBinaryWriterBuilder myBinaryWriterBuilder
myInitialSymbolTableback to summary
private SymbolTable myInitialSymbolTable

System or local

mySymtabValueFactoryback to summary
private ValueFactory mySymtabValueFactory

Constructor Detail

_Private_IonBinaryWriterBuilderback to summary
private _Private_IonBinaryWriterBuilder()
_Private_IonBinaryWriterBuilderback to summary
private _Private_IonBinaryWriterBuilder(_Private_IonBinaryWriterBuilder that)

Method Detail

buildback to summary
public final IonWriter build(OutputStream out)

Implements abstract com.amazon.ion.system.IonWriterBuilder.build.

Doc from com.amazon.ion.system.IonWriterBuilder.build.

Builds a new writer based on this builder's configuration properties.

Parameters
out:OutputStream

the stream that will receive Ion data. Must not be null.

Returns:IonWriter

a new IonWriter instance; not null.

Annotations
@Override
buildContextSymbolTableback to summary
pack-priv SymbolTable buildContextSymbolTable()

Returns a symtab usable in a local context. This copies myInitialSymbolTable if symbols have been added to it since setInitialSymbolTable(SymbolTable) was called.

buildLegacyback to summary
public final IonBinaryWriter buildLegacy()

Deprecated

Annotations
@Deprecated
buildSystemWriterback to summary
private IonWriterSystemBinary buildSystemWriter(OutputStream out)
copyback to summary
public final _Private_IonBinaryWriterBuilder copy()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.copy.

Doc from com.amazon.ion.system.IonWriterBuilderBase.copy.

Creates a mutable copy of this builder.

Returns:_Private_IonBinaryWriterBuilder

a new builder with the same configuration as this.

Annotations
@Override
fillDefaultsback to summary
private _Private_IonBinaryWriterBuilder fillDefaults()

Fills all properties and returns an immutable builder.

fillLegacyDefaultsback to summary
private _Private_IonBinaryWriterBuilder fillLegacyDefaults()

Fills all properties and returns an immutable builder.

getInitialSymbolTableback to summary
public SymbolTable getInitialSymbolTable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.getInitialSymbolTable.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.getInitialSymbolTable.

Gets the symbol table to use for encoded data. To avoid conflicts between different data streams, if the given instance is mutable, it will be copied when build() is called.

Returns:SymbolTable

a local or system symbol table. May be null, in which case the initial symbol table is that of $ion_1_0.

Annotations
@Override
getSymtabValueFactoryback to summary
public ValueFactory getSymtabValueFactory()
immutableback to summary
public _Private_IonBinaryWriterBuilder immutable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.immutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.immutable.

Returns an immutable builder configured exactly like this one.

Returns:_Private_IonBinaryWriterBuilder

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

Annotations
@Override
mutableback to summary
public _Private_IonBinaryWriterBuilder mutable()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.mutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutable.

Returns a mutable builder configured exactly like this one.

Returns:_Private_IonBinaryWriterBuilder

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

Annotations
@Override
setAutoFlushEnabledback to summary
public void setAutoFlushEnabled(boolean autoFlushEnabled)
setBlockSizeback to summary
public void setBlockSize(int size)
setCatalogback to summary
public void setCatalog(final IonCatalog catalog)

Overrides com.amazon.ion.system.IonWriterBuilderBase.setCatalog.

Doc from com.amazon.ion.system.IonWriterBuilderBase.setCatalog.

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.

Annotations
@Override
setImportsback to summary
public void setImports(final SymbolTable... imports)

Overrides com.amazon.ion.system.IonWriterBuilderBase.setImports.

Doc from com.amazon.ion.system.IonWriterBuilderBase.setImports.

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.

Annotations
@Override
setInitialSymbolTableback to summary
public void setInitialSymbolTable(SymbolTable symtab)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setInitialSymbolTable.

Declares the symbol table to use for encoded data. To avoid conflicts between different data streams, if the given instance is mutable, it will be copied when build() is called.

Parameters
symtab:SymbolTable

must be a local or system symbol table. May be null, in which case the initial symtab is that of $ion_1_0.

Annotations
@Override
Exceptions
SubstituteSymbolTableException:
if any imported table is a substitute (see SymbolTable).
setIsFloatBinary32Enabledback to summary
public void setIsFloatBinary32Enabled(boolean enabled)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setIsFloatBinary32Enabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.setIsFloatBinary32Enabled.

Enables or disables writing Binary32 (4-byte, single precision, IEEE-754) values for floats when there would be no loss in precision. By default Binary32 support is disabled to ensure the broadest compatibility with existing Ion implementations. Historically, implementations were only able to read Binary64 values.

When enabled, floats are evaluated for a possible loss of data at single precision. If the value can be represented in single precision without data loss, it is written as a 4-byte, Binary32 value. Floats which cannot be represented as single-precision values are written as 8-byte, Binary64 values (this is the legacy behavior for all floats, regardless of value).

Parameters
enabled:boolean

true to enable writing 4-byte floats, false to always write 8-byte floats.

Annotations
@Override
setLocalSymbolTableAppendEnabledback to summary
public void setLocalSymbolTableAppendEnabled(boolean enabled)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.setLocalSymbolTableAppendEnabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.setLocalSymbolTableAppendEnabled.

Enables or disables writing local symbol tables that append symbols to the current symbol table. This functionality is disabled by default.

Annotations
@Override
setStreamCopyOptimizedback to summary
public void setStreamCopyOptimized(final boolean optimized)

Overrides com.amazon.ion.system.IonBinaryWriterBuilder.setStreamCopyOptimized.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.setStreamCopyOptimized.

Declares whether built writers may attempt to optimize IonWriter#writeValue(IonReader) by copying raw source data. By default, this property is false.

This feature is experimental! Please test thoroughly and report any issues.

Annotations
@Override
setSymtabValueFactoryback to summary
public void setSymtabValueFactory(ValueFactory factory)
standardback to summary
public static _Private_IonBinaryWriterBuilder standard()

Hides com.amazon.ion.system.IonBinaryWriterBuilder.standard.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.standard.

The standard builder of binary writers, with all configuration properties having their default values.

Returns:_Private_IonBinaryWriterBuilder

a new mutable builder.

withAutoFlushEnabledback to summary
public _Private_IonBinaryWriterBuilder withAutoFlushEnabled(boolean autoFlushEnabled)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withAutoFlushEnabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withAutoFlushEnabled.

Auto-flush enables automatic execution of flush operations during the write process. When auto-flush is enabled and a new block allocation becomes necessary while writing the top-level value, a new block will be allocated. The data writing process will then continue uninterrupted until the top-level value is complete. After completing the top-level value that crosses the block boundary, the flush operation will be executed. This feature optimizes performance of the writing of long data streams by reducing block allocations. Additionally, setting a larger block size can further tune performance when auto-flush is enabled. A larger block size leads to fewer block allocations and reduces the frequency of flush operations when auto-flush is enabled. Here is where you can set up the block size of write buffer. Auto-flush is disabled by default and the default block size is 32K.

Parameters
autoFlushEnabled:boolean

A boolean parameter indicating whether this functionality is enabled or not.

Annotations
@Override
withBlockSizeback to summary
public _Private_IonBinaryWriterBuilder withBlockSize(int size)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withBlockSize.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withBlockSize.

Specify the block size for write buffer.

Parameters
size:int

represent the specified block size in bytes. If this functionality is not set, the default block size is 32768 bytes.

Annotations
@Override
withFloatBinary32Disabledback to summary
public _Private_IonBinaryWriterBuilder withFloatBinary32Disabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Disabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Disabled.

Disables writing Binary32 (4-byte, single precision, IEEE-754) values for floats. This is the default behavior.

When disabled, floats are always written as 8-byte, Binary64 values regardless of value. This is the legacy behavior for all Ion binary writers and ensures the boarded compatibility with other Ion consumers.

Annotations
@Override
withFloatBinary32Enabledback to summary
public _Private_IonBinaryWriterBuilder withFloatBinary32Enabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Enabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withFloatBinary32Enabled.

Enables writing Binary32 (4-byte, single precision, IEEE-754) values for floats when there would be no loss in precision. By default Binary32 support is disabled to ensure the broadest compatibility with existing Ion implementations. Historically, implementations were only able to read Binary64 values.

When enabled, floats are evaluated for a possible loss of data at single precision. If the value can be represented in single precision without data loss, it is written as a 4-byte, Binary32 value. Floats which cannot be represented as single-precision values are written as 8-byte, Binary64 values (this is the legacy behavior for all floats, regardless of value).

Annotations
@Override
withInitialSymbolTableback to summary
public _Private_IonBinaryWriterBuilder withInitialSymbolTable(SymbolTable symtab)

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withInitialSymbolTable.

Defaults to $ion_1_0 if null.

Parameters
symtab:SymbolTable

may be null.

Annotations
@Override
withLocalSymbolTableAppendDisabledback to summary
public _Private_IonBinaryWriterBuilder withLocalSymbolTableAppendDisabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendDisabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendDisabled.

Disables writing local symbol tables that append symbols to the current symbol table. This functionality is disabled by default.

Annotations
@Override
withLocalSymbolTableAppendEnabledback to summary
public _Private_IonBinaryWriterBuilder withLocalSymbolTableAppendEnabled()

Implements abstract com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendEnabled.

Doc from com.amazon.ion.system.IonBinaryWriterBuilder.withLocalSymbolTableAppendEnabled.

Enables writing local symbol tables that append symbols to the current symbol table. This functionality is disabled by default.

Annotations
@Override
withSymtabValueFactoryback to summary
public _Private_IonBinaryWriterBuilder withSymtabValueFactory(ValueFactory factory)
com.amazon.ion.impl back to summary

private final Class _Private_IonBinaryWriterBuilder.Mutable

extends _Private_IonBinaryWriterBuilder
Class Inheritance

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
public _Private_IonBinaryWriterBuilder
immutable()

Overrides com.amazon.ion.impl._Private_IonBinaryWriterBuilder.immutable.

Returns an immutable builder configured exactly like this one.

public _Private_IonBinaryWriterBuilder
mutable()

Overrides com.amazon.ion.impl._Private_IonBinaryWriterBuilder.mutable.

Returns a mutable builder configured exactly like this one.

protected void
Inherited from com.amazon.ion.impl._Private_IonBinaryWriterBuilder:
buildbuildContextSymbolTablebuildLegacycopygetInitialSymbolTablegetSymtabValueFactorysetAutoFlushEnabledsetBlockSizesetCatalogsetImportssetInitialSymbolTablesetIsFloatBinary32EnabledsetLocalSymbolTableAppendEnabledsetStreamCopyOptimizedsetSymtabValueFactorystandardwithAutoFlushEnabledwithBlockSizewithFloatBinary32DisabledwithFloatBinary32EnabledwithInitialSymbolTablewithLocalSymbolTableAppendDisabledwithLocalSymbolTableAppendEnabledwithSymtabValueFactory

Constructor Detail

Mutableback to summary
private Mutable()
Mutableback to summary
private Mutable(_Private_IonBinaryWriterBuilder that)

Method Detail

immutableback to summary
public _Private_IonBinaryWriterBuilder immutable()

Overrides com.amazon.ion.impl._Private_IonBinaryWriterBuilder.immutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.immutable.

Returns an immutable builder configured exactly like this one.

Returns:_Private_IonBinaryWriterBuilder

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

Annotations
@Override
mutableback to summary
public _Private_IonBinaryWriterBuilder mutable()

Overrides com.amazon.ion.impl._Private_IonBinaryWriterBuilder.mutable.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutable.

Returns a mutable builder configured exactly like this one.

Returns:_Private_IonBinaryWriterBuilder

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

Annotations
@Override
mutationCheckback to summary
protected void mutationCheck()

Overrides com.amazon.ion.system.IonWriterBuilderBase.mutationCheck.

Doc from com.amazon.ion.system.IonWriterBuilderBase.mutationCheck.

NOT FOR APPLICATION USE!

Annotations
@Override