Class _Private_IonReaderBuilder

java.lang.Object
com.amazon.ion.system.IonReaderBuilder
com.amazon.ion.impl._Private_IonReaderBuilder
Direct Known Subclasses:
_Private_IonReaderBuilder.Mutable

public class _Private_IonReaderBuilder extends IonReaderBuilder
IonReaderBuilder extension for internal use only.
  • Method Details

    • withLstFactory

      public IonReaderBuilder withLstFactory(_Private_LocalSymbolTableFactory factory)
      Declares the _Private_LocalSymbolTableFactory to use when constructing applicable readers.
      Parameters:
      factory - the factory to use, or LocalSymbolTable.DEFAULT_LST_FACTORY if null.
      Returns:
      this builder instance, if mutable; otherwise a mutable copy of this builder.
      See Also:
    • setLstFactory

      public void setLstFactory(_Private_LocalSymbolTableFactory factory)
      See Also:
    • build

      public IonReader build(byte[] ionData, int offset, int length)
      Description copied from class: IonReaderBuilder
      Based on the builder's configuration properties, creates a new IonReader instance over the given block of Ion data, detecting whether it's text or binary data.

      This method will auto-detect and uncompress GZIPped Ion data.

      Specified by:
      build in class IonReaderBuilder
      Parameters:
      ionData - the source of the Ion data, which is used only within the range of bytes starting at offset for len bytes. The data in that range may be either Ion binary data or UTF-8 Ion text. The reader retains a reference to the array, so its data must not be modified while the reader is active. Must not be null.
      offset - must be non-negative and less than ionData.length.
      length - must be non-negative and offset+length must not exceed ionData.length.
      See Also:
    • build

      public IonReader build(InputStream source)
      Description copied from class: IonReaderBuilder
      Based on the builder's configuration properties, creates a new IonReader instance over the given stream of Ion data, detecting whether it's text or binary data.

      This method will auto-detect and uncompress GZIPped Ion data.

      Because this library performs its own buffering, it's recommended that users avoid adding additional buffering to the given stream.

      Specified by:
      build in class IonReaderBuilder
      Parameters:
      source - the source of the Ion data, which may be either Ion binary data or UTF-8 Ion text. Must not be null.
      Returns:
      a new reader instance. Callers must call Closeable.close() when finished with it.
      See Also:
    • build

      public IonReader build(Reader ionText)
      Description copied from class: IonReaderBuilder
      Based on the builder's configuration properties, creates a new IonReader instance over Ion text data.

      Applications should generally use IonReaderBuilder.build(InputStream) whenever possible, since this library has much faster Unicode decoding than the Java IO framework.

      Because this library performs its own buffering, it's recommended that you avoid adding additional buffering to the given stream.

      Specified by:
      build in class IonReaderBuilder
      Parameters:
      ionText - the source of the Ion text data. Must not be null.
      See Also:
    • build

      public IonReader build(IonValue value)
      Description copied from class: IonReaderBuilder
      Based on the builder's configuration properties, creates a new IonReader instance over an IonValue data model. Typically this is used to iterate over a collection, such as an IonStruct. The given value and its children, if any, must not be modified until after the IonReader constructed by this method is closed. Violating this constraint results in undefined behavior.
      Specified by:
      build in class IonReaderBuilder
      Parameters:
      value - must not be null.
      See Also:
    • build

      public IonTextReader build(String ionText)
      Description copied from class: IonReaderBuilder
      Based on the builder's configuration properties, creates an new IonReader instance over Ion text data.
      Specified by:
      build in class IonReaderBuilder
      Parameters:
      ionText - the source of the Ion text data. Must not be null.
      See Also: