Package com.amazon.ion.system
Class IonWriterBuilder
java.lang.Object
com.amazon.ion.system.IonWriterBuilder
- Direct Known Subclasses:
IonBinaryWriterBuilder,IonTextWriterBuilder
Common options for writing Ion data streams of any form.
WARNING: This class should not be extended by code outside of this library.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA strategy for altering emission of Ion version markers at the start of an Ion stream.static enumA strategy for minimizing the output of non-initial Ion version markers. -
Method Summary
Modifier and TypeMethodDescriptionabstract IonWriterbuild(OutputStream out) Builds a new writer based on this builder's configuration properties.abstract IonWriterBuilder.InitialIvmHandlingGets the strategy for emitting Ion version markers at the start of the stream.abstract IonWriterBuilder.IvmMinimizingGets the strategy for eliminating Ion version markers mid-stream.
-
Method Details
-
getInitialIvmHandling
Gets the strategy for emitting Ion version markers at the start of the stream. By default, IVMs are emitted only when explicitly written or when necessary (for example, before data that's not Ion 1.0, or at the start of Ion binary output).- Returns:
- the initial IVM strategy. Null indicates the default for the specific output form.
-
getIvmMinimizing
Gets the strategy for eliminating Ion version markers mid-stream. By default, IVMs are emitted as received or when necessary.This strategy does not affect handling of IVMs at the start of the stream; that's the job of
IonWriterBuilder.InitialIvmHandling.- Returns:
- the IVM minimizing strategy.
-
build
Builds a new writer based on this builder's configuration properties.- Parameters:
out- the stream that will receive Ion data. Must not be null.- Returns:
- a new
IonWriterinstance; notnull.
-