Class _Private_IonReaderBuilder

    • Method Detail

      • 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:
        IonSystem.newReader(byte[], int, int)
      • build

        public IonReader build​(java.io.InputStream ionData)
        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:
        ionData - 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:
        IonSystem.newReader(InputStream)
      • build

        public IonReader build​(java.io.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:
        IonSystem.newReader(Reader)
      • 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:
        IonSystem.newReader(IonValue)