Top Description Interfaces Classes
[default module]

Package com.amazon.ion.impl.bin


Provides the implementation for the second-generation Ion binary implementation. At this time, this is limited to a binary com.amazon.ion.IonWriter.

This package limits most of its APIs to package-level access, the public API of note is contained within the com.amazon.ion.impl.bin._Private_IonManagedBinaryWriterBuilder which builds instances of com.amazon.ion.impl.bin.IonManagedBinaryWriter. See the below section for what Managed means in this context.

Block API

A generalized interface for blocks of heap memory are provided via the com.amazon.ion.impl.bin.Block API. There are two factory type APIs to actually get a com.amazon.ion.impl.bin.Block instance: com.amazon.ion.impl.bin.BlockAllocator which vend blocks of a particular fixed size and com.amazon.ion.impl.bin.BlockAllocatorProvider which creates com.amazon.ion.impl.bin.BlockAllocator instances.

The primary reason for this level of indirection is flexibility for the underlying implementations of com.amazon.ion.impl.bin.Block and com.amazon.ion.impl.bin.BlockAllocator. These APIs are not required to be thread-safe, whereas com.amazon.ion.impl.bin.BlockAllocatorProvider is required to be thread-safe.

The APIs for com.amazon.ion.impl.bin.BlockAllocator and com.amazon.ion.impl.bin.Block follow the resource pattern (similar in principle to I/O streams), and should be closed when no longer needed to allow implementation resources to be released or re-used.

Raw Binary Ion Writer

The com.amazon.ion.impl.bin.IonRawBinaryWriter deals with the low-level encoding considerations of the Ion format. The com.amazon.ion.impl.bin.WriteBuffer is used closely with this implementation to deal with the Ion sub-field encodings (e.g. VarInt, VarUInt, and UTF-8).

Managed Binary Ion Writer

The com.amazon.ion.impl.bin.IonManagedBinaryWriter is layered on top of the com.amazon.ion.impl.bin.IonRawBinaryWriter. In particular, it intercepts symbol, annotation, field names and handles the mechanics of symbol table management transparently to the user.

Interface Summary

Modifier and TypeInterface and Description
public interface
_Private_IonManagedWriter

Deprecated This is a private API subject to change without notice.
An IonWriter that manages local symbol tables, while providing access to its underlying IonRawWriter.
public interface
_Private_IonRawWriter

Deprecated This is a private API subject to change without notice.
An IonWriter with no symbol table management.

Class Summary

Modifier and TypeClass and Description
public class
_Private_IonManagedBinaryWriterBuilder

Constructs instances of binary IonWriter.

public class
_PrivateIon_HashTrampoline

Deprecated
NOT FOR APPLICATION USE!
pack-priv abstract class
AbstractIonWriter

Common adapter for binary IonWriter implementations.

pack-priv abstract class
AbstractSymbolTable

Provides the basic implementation bits for SymbolTable.

pack-priv abstract class
Block

An abstraction for a block of managed memory.

pack-priv abstract class
BlockAllocator

Creates Block instances of fixed size.

pack-priv abstract class
pack-priv class
public class
IntList

A list of integer values that grows as necessary.

pack-priv class
IonBinaryWriterAdapter

Deprecated
Adapts arbitrary IonWriter implementations to an IonBinaryWriter instances.
pack-priv class
IonManagedBinaryWriter

References Deprecated _Private_IonManagedWriter is deprecated or references (maybe indirectly) at least one deprecated element.
Wraps IonRawBinaryWriter with symbol table management.
pack-priv class
IonRawBinaryWriter

References Deprecated _Private_IonRawWriter is deprecated or references (maybe indirectly) at least one deprecated element.
Low-level binary IonWriter that understands encoding concerns but doesn't operate with any sense of symbol table management.
pack-priv class
PooledBlockAllocatorProvider

A singleton implementation of BlockAllocatorProvider offering a thread-safe free block list for each block size.

pack-priv class
Symbols

Utilities for dealing with SymbolToken and SymbolTable.

pack-priv class
WriteBuffer

A facade over Block management and low-level Ion encoding concerns for the IonRawBinaryWriter.