IonSystems.
Most applications will only have one or two system instances;
see IonSystem for important constraints.
Builders may be configured once and reused to construct multiple
objects. They can be copied to create a mutable
copy of a prototype (presumably for altering some property).
Instances of this class are not safe for use by multiple threads unless they are immutable.
The easiest way to get going is to use the standard() builder:
IonSystem ion = IonSystemBuilder.standard().build();
However, most long-lived applications will want to provide a custom
IonCatalog implementation rather than using the default
SimpleCatalog. For example:
IonCatalog catalog = newCustomCatalog();
IonSystemBuilder b = IonSystemBuilder.standard().copy();
b.setCatalog(catalog);
IonSystem ion = b.build();
Configuration properties follow the standard JavaBeans idiom in order to be friendly to dependency injection systems. They also provide alternative mutation methods that enable a more fluid style:
IonCatalog catalog = newCustomCatalog();
IonSystem ion = IonSystemBuilder.standard()
.withCatalog(catalog)
.build();
This builder provides the following configurable properties:
IonCatalog used as a default when reading Ion
data. If null, each system will be built with a new
SimpleCatalog.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv IonBinaryWriterBuilder | |
| pack-priv IonCatalog | |
| pack-priv boolean | |
| pack-priv IonReaderBuilder | |
| private static final IonSystemBuilder | |
| pack-priv IonTextWriterBuilder |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final IonSystem | |
| public final IonSystemBuilder | Returns: a new builder with the same configuration asthis.Creates a mutable copy of this builder. |
| public final IonCatalog | |
| public final IonBinaryWriterBuilder | getIonBinaryWriterBuilder()
Gets the binary writer builder whose options will be used when building an
|
| public final IonTextWriterBuilder | getIonTextWriterBuilder()
Gets the text writer builder whose options will be used when building an
|
| public final IonReaderBuilder | |
| public IonSystemBuilder | Returns: this instance, if immutable; otherwise an immutable copy of this instance.Returns an immutable builder configured exactly like this one. |
| public final boolean | isStreamCopyOptimized()
Indicates whether built systems may attempt to optimize
|
| public IonSystemBuilder | Returns: this instance, if mutable; otherwise a mutable copy of this instance.Returns a mutable builder configured exactly like this one. |
| pack-priv void | |
| public final void | setCatalog(IonCatalog
the catalog to use in built systems.
If null, each system will be built with a new catalog)SimpleCatalog.Sets the catalog to use when building an |
| public final void | setIonBinaryWriterBuilder(IonBinaryWriterBuilder
the writer builder to use in built systems.
If unset, each system will be built with builder)IonBinaryWriterBuilder#standard().Sets the binary writer builder whose options will be used when building
an |
| public final void | setIonTextWriterBuilder(IonTextWriterBuilder
the writer builder to use in built systems.
If unset, each system will be built with builder)IonTextWriterBuilder#standard()
using US-ASCII encoding.Sets the text writer builder whose options will be used when building
an |
| public final void | setReaderBuilder(IonReaderBuilder
the reader builder to use in built systems.
If unset, each system will be built with builder)IonReaderBuilder#standard().Sets the reader builder whose options will be used to use when building
an |
| public final void | setStreamCopyOptimized(boolean optimized)
Declares whether built systems may attempt to optimize
|
| public static IonSystemBuilder | |
| public final IonSystemBuilder | withCatalog(IonCatalog
the catalog to use in built systems.
If null, each system will be built with a new catalog)SimpleCatalog.Declares the catalog to use when building an |
| public final IonSystemBuilder | withIonBinaryWriterBuilder(IonBinaryWriterBuilder
the writer builder to use in built systems.
If unset, each system will be built with builder)IonBinaryWriterBuilder#standard().Declares the binary writer builder whose options will be used to use when building
an |
| public final IonSystemBuilder | withIonTextWriterBuilder(IonTextWriterBuilder
the writer builder to use in built systems.
If unset, each system will be built with builder)IonTextWriterBuilder#standard()
using US-ASCII encoding.Declares the text writer builder whose options will be used when building
an |
| public final IonSystemBuilder | withReaderBuilder(IonReaderBuilder
the reader builder to use in built systems.
If unset, each system will be built with builder)IonReaderBuilder#standard().Declares the reader builder whose options will be used to use when building
an |
| public final IonSystemBuilder | withStreamCopyOptimized(boolean optimized)
Declares whether built systems may attempt to optimize
|
| binaryWriterBuilder | back to summary |
|---|---|
| pack-priv IonBinaryWriterBuilder binaryWriterBuilder | |
| myCatalog | back to summary |
|---|---|
| pack-priv IonCatalog myCatalog | |
| myStreamCopyOptimized | back to summary |
|---|---|
| pack-priv boolean myStreamCopyOptimized | |
| readerBuilder | back to summary |
|---|---|
| pack-priv IonReaderBuilder readerBuilder | |
| STANDARD | back to summary |
|---|---|
| private static final IonSystemBuilder STANDARD | |
| textWriterBuilder | back to summary |
|---|---|
| pack-priv IonTextWriterBuilder textWriterBuilder | |
| IonSystemBuilder | back to summary |
|---|---|
| private IonSystemBuilder() You no touchy. | |
| IonSystemBuilder | back to summary |
|---|---|
| private IonSystemBuilder(IonSystemBuilder that) | |
| build | back to summary |
|---|---|
| public final IonSystem build() Builds a new | |
| copy | back to summary |
|---|---|
| public final IonSystemBuilder copy() Creates a mutable copy of this builder.
| |
| getCatalog | back to summary |
|---|---|
| public final IonCatalog getCatalog() Gets the catalog to use when building an | |
| getIonBinaryWriterBuilder | back to summary |
|---|---|
| public final IonBinaryWriterBuilder getIonBinaryWriterBuilder() Gets the binary writer builder whose options will be used when building an
| |
| getIonTextWriterBuilder | back to summary |
|---|---|
| public final IonTextWriterBuilder getIonTextWriterBuilder() Gets the text writer builder whose options will be used when building an
| |
| getReaderBuilder | back to summary |
|---|---|
| public final IonReaderBuilder getReaderBuilder() Gets the reader builder whose options will be used when building an
| |
| immutable | back to summary |
|---|---|
| public IonSystemBuilder immutable() Returns an immutable builder configured exactly like this one.
| |
| isStreamCopyOptimized | back to summary |
|---|---|
| public final boolean isStreamCopyOptimized() Indicates whether built systems may attempt to optimize
| |
| mutable | back to summary |
|---|---|
| public IonSystemBuilder mutable() Returns a mutable builder configured exactly like this one.
| |
| mutationCheck | back to summary |
|---|---|
| pack-priv void mutationCheck() | |
| setCatalog | back to summary |
|---|---|
| public final void setCatalog(IonCatalog catalog) Sets the catalog to use when building an
| |
| setIonBinaryWriterBuilder | back to summary |
|---|---|
| public final void setIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) Sets the binary writer builder whose options will be used when building
an
| |
| setIonTextWriterBuilder | back to summary |
|---|---|
| public final void setIonTextWriterBuilder(IonTextWriterBuilder builder) Sets the text writer builder whose options will be used when building
an
| |
| setReaderBuilder | back to summary |
|---|---|
| public final void setReaderBuilder(IonReaderBuilder builder) Sets the reader builder whose options will be used to use when building
an
| |
| setStreamCopyOptimized | back to summary |
|---|---|
| public final void setStreamCopyOptimized(boolean optimized) Declares whether built systems may attempt to optimize
This feature is experimental! Please test thoroughly and report any issues.
| |
| standard | back to summary |
|---|---|
| public static IonSystemBuilder standard() The standard builder of The returned instance is immutable. | |
| withCatalog | back to summary |
|---|---|
| public final IonSystemBuilder withCatalog(IonCatalog catalog) Declares the catalog to use when building an
| |
| withIonBinaryWriterBuilder | back to summary |
|---|---|
| public final IonSystemBuilder withIonBinaryWriterBuilder(IonBinaryWriterBuilder builder) Declares the binary writer builder whose options will be used to use when building
an
| |
| withIonTextWriterBuilder | back to summary |
|---|---|
| public final IonSystemBuilder withIonTextWriterBuilder(IonTextWriterBuilder builder) Declares the text writer builder whose options will be used when building
an
| |
| withReaderBuilder | back to summary |
|---|---|
| public final IonSystemBuilder withReaderBuilder(IonReaderBuilder builder) Declares the reader builder whose options will be used to use when building
an
| |
| withStreamCopyOptimized | back to summary |
|---|---|
| public final IonSystemBuilder withStreamCopyOptimized(boolean optimized) Declares whether built systems may attempt to optimize
This feature is experimental! Please test thoroughly and report any issues. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public IonSystemBuilder | immutable()
Overrides com. Returns an immutable builder configured exactly like this one. |
| public IonSystemBuilder | mutable()
Overrides com. Returns a mutable builder configured exactly like this one. |
| pack-priv void |
| Mutable | back to summary |
|---|---|
| private Mutable(IonSystemBuilder that) | |
| immutable | back to summary |
|---|---|
| public IonSystemBuilder immutable() Overrides com. Doc from com. Returns an immutable builder configured exactly like this one.
| |
| mutable | back to summary |
|---|---|
| public IonSystemBuilder mutable() Overrides com. Doc from com. Returns a mutable builder configured exactly like this one.
| |
| mutationCheck | back to summary |
|---|---|
| pack-priv void mutationCheck() Overrides com.
| |