Top Description Inners Fields Constructors Methods
com.amazon.ion

public final Class IonBufferConfiguration

extends BufferConfiguration<IonBufferConfiguration>
Class Inheritance

Configures buffers that hold Ion data.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
IonBufferConfiguration.Builder

Builds IonBufferConfiguration instances.

public static interface
IonBufferConfiguration.OversizedSymbolTableHandler

Functional interface for handling oversized symbol tables.

Field Summary

Modifier and TypeField and Description
public static final IonBufferConfiguration
DEFAULT

The standard configuration.

private final IonBufferConfiguration.OversizedSymbolTableHandler
oversizedSymbolTableHandler

The handler that will be notified when oversized symbol tables are encountered.

Constructor Summary

AccessConstructor and Description
private
IonBufferConfiguration(IonBufferConfiguration.Builder
the builder containing the settings to apply to the new configuration.
builder
)

Constructs an instance from the given Builder.

Method Summary

Modifier and TypeMethod and Description
public IonBufferConfiguration.OversizedSymbolTableHandler

Returns:

the handler that will be notified when oversized symbol tables are encountered.
getOversizedSymbolTableHandler
()

Inherited from com.amazon.ion.BufferConfiguration:
getDataHandlergetInitialBufferSizegetMaximumBufferSizegetOversizedValueHandlerrequireMaximumBufferSize

Field Detail

DEFAULTback to summary
public static final IonBufferConfiguration DEFAULT

The standard configuration. This will be used unless the user chooses custom settings.

oversizedSymbolTableHandlerback to summary
private final IonBufferConfiguration.OversizedSymbolTableHandler oversizedSymbolTableHandler

The handler that will be notified when oversized symbol tables are encountered.

Constructor Detail

IonBufferConfigurationback to summary
private IonBufferConfiguration(IonBufferConfiguration.Builder builder)

Constructs an instance from the given Builder.

Parameters
builder:IonBufferConfiguration.Builder

the builder containing the settings to apply to the new configuration.

Method Detail

getOversizedSymbolTableHandlerback to summary
public IonBufferConfiguration.OversizedSymbolTableHandler getOversizedSymbolTableHandler()
Returns:IonBufferConfiguration.OversizedSymbolTableHandler

the handler that will be notified when oversized symbol tables are encountered.

com.amazon.ion back to summary

public final Class IonBufferConfiguration.Builder

extends BufferConfiguration.Builder<IonBufferConfiguration, IonBufferConfiguration.Builder>
Class Inheritance

Builds IonBufferConfiguration instances.

Field Summary

Modifier and TypeField and Description
private static final int
MINIMUM_MAX_VALUE_SIZE

4-byte IVM + 1 byte user value.

private static final BufferConfiguration.DataHandler
NO_OP_DATA_HANDLER

A DataHandler that does nothing.

private static final IonBufferConfiguration.OversizedSymbolTableHandler
NO_OP_OVERSIZED_SYMBOL_TABLE_HANDLER

An OversizedSymbolTableHandler that does nothing.

private static final BufferConfiguration.OversizedValueHandler
NO_OP_OVERSIZED_VALUE_HANDLER

An OversizedValueHandler that does nothing.

private IonBufferConfiguration.OversizedSymbolTableHandler
oversizedSymbolTableHandler

The handler that will be notified when oversized symbol tables are encountered.

private static final IonBufferConfiguration.OversizedSymbolTableHandler
private static final BufferConfiguration.OversizedValueHandler
Inherited from com.amazon.ion.BufferConfiguration.Builder:
DEFAULT_INITIAL_BUFFER_SIZE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public IonBufferConfiguration
build()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.build.

Creates a new BufferConfiguration from the Builder's current settings.

public static IonBufferConfiguration.Builder

Returns:

a new mutable builder.
from
(IonBufferConfiguration
an existing configuration.
existingConfiguration
)

Provides a new builder that would build IonBufferConfiguration instances with configuration identical to the given configuration.

public int
getMinimumMaximumBufferSize()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.getMinimumMaximumBufferSize.

Gets the minimum allowed maximum buffer size.

public BufferConfiguration.DataHandler
public IonBufferConfiguration.OversizedSymbolTableHandler

Returns:

an OversizedSymbolTableHandler that does nothing.
getNoOpOversizedSymbolTableHandler
()

public BufferConfiguration.OversizedValueHandler
public IonBufferConfiguration.OversizedSymbolTableHandler

Returns:

the handler that will be notified when oversized symbol tables are encountered.
getOversizedSymbolTableHandler
()

public IonBufferConfiguration.OversizedSymbolTableHandler

Returns:

an OversizedSymbolTableHandler that always throws IonException.
getThrowingOversizedSymbolTableHandler
()

public BufferConfiguration.OversizedValueHandler
public IonBufferConfiguration.Builder

Returns:

this builder.
onOversizedSymbolTable
(IonBufferConfiguration.OversizedSymbolTableHandler
the handler.
handler
)

Sets the handler that will be notified when oversized symbol tables are encountered.

public static IonBufferConfiguration.Builder

Returns:

a standard Builder.
standard
()

Provides the standard builder with the default initial buffer size, an unbounded maximum buffer size, and an event handler that does nothing.

private static void
Inherited from com.amazon.ion.BufferConfiguration.Builder:
getDataHandlergetInitialBufferSizegetMaximumBufferSizegetOversizedValueHandleronDataonOversizedValuewithInitialBufferSizewithMaximumBufferSize

Field Detail

MINIMUM_MAX_VALUE_SIZEback to summary
private static final int MINIMUM_MAX_VALUE_SIZE

4-byte IVM + 1 byte user value.

NO_OP_DATA_HANDLERback to summary
private static final BufferConfiguration.DataHandler NO_OP_DATA_HANDLER

A DataHandler that does nothing.

NO_OP_OVERSIZED_SYMBOL_TABLE_HANDLERback to summary
private static final IonBufferConfiguration.OversizedSymbolTableHandler NO_OP_OVERSIZED_SYMBOL_TABLE_HANDLER

An OversizedSymbolTableHandler that does nothing.

NO_OP_OVERSIZED_VALUE_HANDLERback to summary
private static final BufferConfiguration.OversizedValueHandler NO_OP_OVERSIZED_VALUE_HANDLER

An OversizedValueHandler that does nothing.

oversizedSymbolTableHandlerback to summary
private IonBufferConfiguration.OversizedSymbolTableHandler oversizedSymbolTableHandler

The handler that will be notified when oversized symbol tables are encountered.

THROWING_OVERSIZED_SYMBOL_TABLE_HANDLERback to summary
private static final IonBufferConfiguration.OversizedSymbolTableHandler THROWING_OVERSIZED_SYMBOL_TABLE_HANDLER
THROWING_OVERSIZED_VALUE_HANDLERback to summary
private static final BufferConfiguration.OversizedValueHandler THROWING_OVERSIZED_VALUE_HANDLER

Constructor Detail

Builderback to summary
private Builder()

Method Detail

buildback to summary
public IonBufferConfiguration build()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.build.

Doc from com.amazon.ion.BufferConfiguration.Builder.build.

Creates a new BufferConfiguration from the Builder's current settings.

Returns:IonBufferConfiguration

a new instance.

Annotations
@Override
fromback to summary
public static IonBufferConfiguration.Builder from(IonBufferConfiguration existingConfiguration)

Provides a new builder that would build IonBufferConfiguration instances with configuration identical to the given configuration.

Parameters
existingConfiguration:IonBufferConfiguration

an existing configuration.

Returns:IonBufferConfiguration.Builder

a new mutable builder.

getMinimumMaximumBufferSizeback to summary
public int getMinimumMaximumBufferSize()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.getMinimumMaximumBufferSize.

Doc from com.amazon.ion.BufferConfiguration.Builder.getMinimumMaximumBufferSize.

Gets the minimum allowed maximum buffer size.

Returns:int

the value.

Annotations
@Override
getNoOpDataHandlerback to summary
public BufferConfiguration.DataHandler getNoOpDataHandler()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.getNoOpDataHandler.

Returns:BufferConfiguration.DataHandler

Doc from com.amazon.ion.BufferConfiguration.Builder.getNoOpDataHandler.

the no-op DataHandler for the type of BufferConfiguration that this Builder builds.

Annotations
@Override
getNoOpOversizedSymbolTableHandlerback to summary
public IonBufferConfiguration.OversizedSymbolTableHandler getNoOpOversizedSymbolTableHandler()
Returns:IonBufferConfiguration.OversizedSymbolTableHandler

an OversizedSymbolTableHandler that does nothing.

getNoOpOversizedValueHandlerback to summary
public BufferConfiguration.OversizedValueHandler getNoOpOversizedValueHandler()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.getNoOpOversizedValueHandler.

Returns:BufferConfiguration.OversizedValueHandler

Doc from com.amazon.ion.BufferConfiguration.Builder.getNoOpOversizedValueHandler.

the no-op OversizedValueHandler for the type of BufferConfiguration that this Builder builds.

Annotations
@Override
getOversizedSymbolTableHandlerback to summary
public IonBufferConfiguration.OversizedSymbolTableHandler getOversizedSymbolTableHandler()
Returns:IonBufferConfiguration.OversizedSymbolTableHandler

the handler that will be notified when oversized symbol tables are encountered.

getThrowingOversizedSymbolTableHandlerback to summary
public IonBufferConfiguration.OversizedSymbolTableHandler getThrowingOversizedSymbolTableHandler()
Returns:IonBufferConfiguration.OversizedSymbolTableHandler

an OversizedSymbolTableHandler that always throws IonException.

getThrowingOversizedValueHandlerback to summary
public BufferConfiguration.OversizedValueHandler getThrowingOversizedValueHandler()

Implements abstract com.amazon.ion.BufferConfiguration.Builder.getThrowingOversizedValueHandler.

Returns:BufferConfiguration.OversizedValueHandler

Doc from com.amazon.ion.BufferConfiguration.Builder.getThrowingOversizedValueHandler.

an OversizedValueHandler that always throws a runtime exception.

Annotations
@Override
onOversizedSymbolTableback to summary
public IonBufferConfiguration.Builder onOversizedSymbolTable(IonBufferConfiguration.OversizedSymbolTableHandler handler)

Sets the handler that will be notified when oversized symbol tables are encountered. If the maximum buffer size is finite (see withMaximumBufferSize(int), this handler is required to be non-null.

Parameters
handler:IonBufferConfiguration.OversizedSymbolTableHandler

the handler.

Returns:IonBufferConfiguration.Builder

this builder.

standardback to summary
public static IonBufferConfiguration.Builder standard()

Provides the standard builder with the default initial buffer size, an unbounded maximum buffer size, and an event handler that does nothing.

Returns:IonBufferConfiguration.Builder

a standard Builder.

throwDueToUnexpectedOversizedValueback to summary
private static void throwDueToUnexpectedOversizedValue()
com.amazon.ion back to summary

public Interface IonBufferConfiguration.OversizedSymbolTableHandler

Annotations
@FunctionalInterface

Functional interface for handling oversized symbol tables.

Method Summary

Modifier and TypeMethod and Description
public void
onOversizedSymbolTable()

Invoked when the user specifies a finite maximum buffer size and that size is exceeded by symbol table(s) alone.

Method Detail

onOversizedSymbolTableback to summary
public void onOversizedSymbolTable()

Invoked when the user specifies a finite maximum buffer size and that size is exceeded by symbol table(s) alone. Because symbol tables cannot be truncated without corrupting values that follow in the stream, this condition is not recoverable.