Class IonWriterBuilder

  • Direct Known Subclasses:
    IonBinaryWriterBuilder, IonTextWriterBuilder

    public abstract class IonWriterBuilder
    extends java.lang.Object
    Common options for writing Ion data streams of any form.

    WARNING: This class should not be extended by code outside of this library.

    • Method Detail

      • getInitialIvmHandling

        public abstract IonWriterBuilder.InitialIvmHandling 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

        public abstract IonWriterBuilder.IvmMinimizing 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

        public abstract IonWriter build​(java.io.OutputStream out)
        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 IonWriter instance; not null.