IonReader from the given IonCatalog and data
source. A data source is required, while an IonCatalog is optional. If no
IonCatalog is provided, an empty SimpleCatalog will be used.
IonReaders parse incrementally, so syntax errors in the input data
will not be detected as side effects of any of the build methods
in this class.
| Modifier and Type | Field and Description |
|---|---|
| private IonBufferConfiguration | |
| private IonCatalog | |
| private static final List | |
| private static final List | |
| private boolean | |
| private List |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public IonReaderBuilder | Returns: this builder instance, if mutable; otherwise a mutable copy of this builder.the stream interceptor to add. streamInterceptor)Adds an |
| public IonReader | build(byte[]
the source of the Ion data, which 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. ionData)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. |
| public abstract IonReader | build(byte[]
the source of the Ion data, which is used only within the
range of bytes starting at ionData, int 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.must be non-negative and less than offset, int ionData.length.must be non-negative and length)offset+length must not
exceed ionData.length.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. |
| public abstract IonReader | Returns: a new reader instance. Callers must callIonReader#close() when finished with it.the source of the Ion data, which may be either Ion binary
data or UTF-8 Ion text. Must not be null. ionData)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. |
| public abstract IonReader | |
| public abstract IonReader | |
| public abstract IonTextReader | build(String
the source of the Ion text data. Must not be null. ionText)
References Deprecated
IonTextReader is deprecated or references (maybe indirectly) at least one deprecated element.
Based on the builder's configuration properties, creates an new
|
| public IonReaderBuilder | Returns: a new builder with the same configuration asthis.Creates a mutable copy of this builder. |
| private static List | Returns: the stream interceptors.Detects implementations of |
| public IonBufferConfiguration | |
| public IonCatalog | getCatalog()
Gets the catalog to use when building an |
| public List | Returns: an unmodifiable view of the stream interceptors currently configured.Gets the |
| public IonReaderBuilder | Returns: this builder instance, if immutable; otherwise an immutable copy of this builder.Returns an immutable builder configured exactly like this one. |
| public boolean | |
| public IonReaderBuilder | Returns: this instance, if mutable; otherwise a mutable copy of this instance.Returns a mutable builder configured exactly like this one. |
| protected void | |
| public void | |
| public void | setCatalog(IonCatalog
the catalog to use in built readers.
If null, a new catalog)SimpleCatalog will be used.Sets the catalog to use when building an |
| public void | |
| public void | |
| public static IonReaderBuilder | |
| protected IonCatalog | |
| public IonReaderBuilder | Returns: this builder instance, if mutable; otherwise a mutable copy of this builder.the configuration. configuration)Sets the buffer configuration. |
| public IonReaderBuilder | Returns: this builder instance, if mutable; otherwise a mutable copy of this builder.the catalog to use in built readers.
If null, a new catalog)SimpleCatalog will be used.Declares the catalog to use when building an |
| public IonReaderBuilder | Returns: this builder instance, if mutable; otherwise a mutable copy of this builder.true if the option is enabled; otherwise, false. isEnabled)Determines whether the IonReader will allow incremental reading of binary Ion data. |
| bufferConfiguration | back to summary |
|---|---|
| private IonBufferConfiguration bufferConfiguration | |
| catalog | back to summary |
|---|---|
| private IonCatalog catalog | |
| DEFAULT_STREAM_INTERCEPTORS | back to summary |
|---|---|
| private static final List<InputStreamInterceptor> DEFAULT_STREAM_INTERCEPTORS | |
| DETECTED_STREAM_INTERCEPTORS | back to summary |
|---|---|
| private static final List<InputStreamInterceptor> DETECTED_STREAM_INTERCEPTORS | |
| isIncrementalReadingEnabled | back to summary |
|---|---|
| private boolean isIncrementalReadingEnabled | |
| streamInterceptors | back to summary |
|---|---|
| private List<InputStreamInterceptor> streamInterceptors | |
| IonReaderBuilder | back to summary |
|---|---|
| protected IonReaderBuilder() | |
| IonReaderBuilder | back to summary |
|---|---|
| protected IonReaderBuilder(IonReaderBuilder that) | |
| addInputStreamInterceptor | back to summary |
|---|---|
| public IonReaderBuilder addInputStreamInterceptor(InputStreamInterceptor streamInterceptor) Adds an
Users may also or instead register implementations as service providers on the classpath.
See
The list of stream interceptors available to the reader always begins with
| |
| build | back to summary |
|---|---|
| public IonReader build(byte[] ionData) 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.
| |
| build | back to summary |
|---|---|
| public abstract IonReader build(byte[] ionData, int offset, int length) 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.
| |
| build | back to summary |
|---|---|
| public abstract IonReader build(InputStream ionData) 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.
| |
| build | back to summary |
|---|---|
| public abstract IonReader build(Reader ionText) Based on the builder's configuration properties, creates a new
Applications should generally use Because this library performs its own buffering, it's recommended that you avoid adding additional buffering to the given stream.
| |
| build | back to summary |
|---|---|
| public abstract IonReader build(IonValue value) Based on the builder's configuration properties, creates a new
| |
| build | back to summary |
|---|---|
| public abstract IonTextReader build(String ionText)
References Deprecated
See corresponding docs for further information. Based on the builder's configuration properties, creates an new
| |
| copy | back to summary |
|---|---|
| public IonReaderBuilder copy() Creates a mutable copy of this builder.
| |
| detectStreamInterceptorsOnClasspath | back to summary |
|---|---|
| private static List Detects implementations of
| |
| getBufferConfiguration | back to summary |
|---|---|
public IonBufferConfiguration getBufferConfiguration()
| |
| getCatalog | back to summary |
|---|---|
| public IonCatalog getCatalog() Gets the catalog to use when building an | |
| getInputStreamInterceptors | back to summary |
|---|---|
| public List Gets the
| |
| immutable | back to summary |
|---|---|
| public IonReaderBuilder immutable() Returns an immutable builder configured exactly like this one.
| |
| isIncrementalReadingEnabled | back to summary |
|---|---|
public boolean isIncrementalReadingEnabled()
| |
| mutable | back to summary |
|---|---|
| public IonReaderBuilder mutable() Returns a mutable builder configured exactly like this one.
| |
| mutationCheck | back to summary |
|---|---|
| protected void mutationCheck() NOT FOR APPLICATION USE! | |
| setBufferConfiguration | back to summary |
|---|---|
| public void setBufferConfiguration(IonBufferConfiguration configuration) | |
| setCatalog | back to summary |
|---|---|
| public void setCatalog(IonCatalog catalog) Sets the catalog to use when building an
| |
| setIncrementalReadingDisabled | back to summary |
|---|---|
| public void setIncrementalReadingDisabled() | |
| setIncrementalReadingEnabled | back to summary |
|---|---|
| public void setIncrementalReadingEnabled() | |
| standard | back to summary |
|---|---|
| public static IonReaderBuilder standard() The standard builder of
| |
| validateCatalog | back to summary |
|---|---|
| protected IonCatalog validateCatalog() | |
| withBufferConfiguration | back to summary |
|---|---|
| public IonReaderBuilder withBufferConfiguration(IonBufferConfiguration configuration) Sets the buffer configuration. This can be used, for example, to set a maximum buffer size
and receive notifications when values would exceed this size. Currently, this is ignored unless incremental
reading has been enabled via
| |
| withCatalog | back to summary |
|---|---|
| public IonReaderBuilder withCatalog(IonCatalog catalog) Declares the catalog to use when building an
| |
| withIncrementalReadingEnabled | back to summary |
|---|---|
| public IonReaderBuilder withIncrementalReadingEnabled(boolean isEnabled)
Determines whether the IonReader will allow incremental reading of binary Ion data. When enabled, if
There is currently no incremental text IonReader, so for text data a non-incremental IonReader will be returned regardless of the value of this option. If incremental text reading is supported in the future, it may be enabled via this option. There is one caveat to note when using this option: the incremental implementation must be able to buffer an entire top-level value in memory. This will not be a problem for the vast majority of Ion streams, as it is rare for a single top-level value or symbol table to exceed a few megabytes in size. However, if the size of the stream's values risks exceeding the available memory, then this option must not be enabled.
| |