Top Inners Fields Constructors Methods
com.amazon.ion.impl.lite

pack-priv final Class IonSystemLite

extends ValueFactoryLite
implements _Private_IonSystem
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl._Private_IonSystem, com.amazon.ion.IonSystem, com.amazon.ion.ValueFactory
Annotations
@SuppressWarnings:deprecation
Static Imports
com.amazon.ion.SymbolTable.UNKNOWN_SYMBOL_ID, .SystemSymbols.ION_1_0, .SystemSymbols.ION_SYMBOL_TABLE, com.amazon.ion.impl._Private_IonReaderFactory.makeSystemReader, ._Private_IonReaderFactory.makeSystemReaderText, ._Private_Utils.addAllNonNull, ._Private_Utils.initialSymtab, ._Private_Utils.newSymbolToken, com.amazon.ion.util.IonTextUtils.printString

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
private class

Field Summary

Modifier and TypeField and Description
private final IonCatalog
_catalog

Not null.

private final IonLoader
private final SymbolTable
private final _Private_IonBinaryWriterBuilder
private final IonReaderBuilder
myReaderBuilder

Immutable.

private final IonTextWriterBuilder
Inherited from com.amazon.ion.impl.lite.ValueFactoryLite:
_lstFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public <T extends IonValue> T
clone(T
the value to copy.
value
)

Implements com.amazon.ion.ValueFactory.clone.

Creates a deep copy of an Ion value.

public IonCatalog
getCatalog()

Implements com.amazon.ion.IonSystem.getCatalog.

Gets the catalog used by this system.

public IonLoader
getLoader()

Implements com.amazon.ion.IonSystem.getLoader.

Gets the default system loader.

pack-priv IonReaderBuilder
public final SymbolTable
getSystemSymbolTable()

Implements com.amazon.ion.IonSystem.getSystemSymbolTable.

Gets the default system symbol table.

public SymbolTable
getSystemSymbolTable(String
must be of the form "$ion_X_Y".
ionVersionId
)

Implements com.amazon.ion.IonSystem.getSystemSymbolTable.

Gets a system symbol table for a specific version of Ion.

public boolean
isStreamCopyOptimized()

Implements com.amazon.ion.impl._Private_IonSystem.isStreamCopyOptimized.

Indicates whether writers built by this system may attempt to optimize IonWriter#writeValue(IonReader) by copying raw source data.

public Iterator<IonValue>
iterate(Reader
a stream of Ion text data. The caller is responsible for closing the Reader after iteration is complete.
ionText
)

Implements com.amazon.ion.IonSystem.iterate.

Creates an iterator over a stream of Ion text data.

public Iterator<IonValue>
iterate(InputStream
a stream of Ion data. The caller is responsible for closing the InputStream after iteration is complete.
ionData
)

Implements com.amazon.ion.IonSystem.iterate.

Warning

Will cause a memory leak when reading a gzipped stream, use IonSystem#iterate(IonReader) instead.

public Iterator<IonValue>
iterate(String
must not be null.
ionText
)

Implements com.amazon.ion.IonSystem.iterate.

Creates an iterator over a string containing Ion text data.

public Iterator<IonValue>
iterate(byte[]
may be either Ion binary data or (UTF-8) Ion text, or GZIPped Ion data. This method assumes ownership of the array and may modify it at will.
ionData
)

Implements com.amazon.ion.IonSystem.iterate.

Warning

Will cause a memory leak when reading a gzipped byte[], use IonSystem#iterate(IonReader) instead.

public Iterator<IonValue>
iterate(IonReader
source of the Ion data to iterate over.
reader
)

Implements com.amazon.ion.IonSystem.iterate.

Creates an iterator over Ion data.

private IonValueLite
public IonBinaryWriter
newBinaryWriter()

Implements com.amazon.ion.IonSystem.newBinaryWriter.

Deprecated

Creates a new writer that will encode binary Ion data.

public IonBinaryWriter
newBinaryWriter(SymbolTable...
a sequence of shared symbol tables
imports
)

Implements com.amazon.ion.IonSystem.newBinaryWriter.

Deprecated

Creates a new writer that will encode binary Ion data, using the given shared symbol tables as imports.

public IonWriter
newBinaryWriter(OutputStream
the stream to receive binary Ion data; not null.
out
,
SymbolTable...
a sequence of shared symbol tables to import. The first (and only the first) may be a system table.
imports
)

Implements com.amazon.ion.IonSystem.newBinaryWriter.

Creates a new writer that will encode binary Ion data, using the given shared symbol tables as imports.

public IonTimestamp
newCurrentUtcTimestamp()

Implements com.amazon.ion.IonSystem.newCurrentUtcTimestamp.

Constructs a new UTC timestamp instance initialized so that it represents the time at which it was allocated, measured to the nearest millisecond.

public IonDatagram
newDatagram()

Implements com.amazon.ion.IonSystem.newDatagram.

Creates a new empty datagram.

public IonDatagramLite
public IonDatagram
newDatagram(IonValue
becomes the first and only (user) value in the datagram. The child's system must be this system. If null, then the returned datagram will have no user values.
initialChild
)

Implements com.amazon.ion.IonSystem.newDatagram.

Creates a new datagram containing one value.

public IonDatagram
newDatagram(IonCatalog catalog, IonValue initialChild)

public IonDatagram
newDatagram(SymbolTable...
the set of shared symbol tables to import. The first (and only the first) may be a system table.
imports
)

Implements com.amazon.ion.IonSystem.newDatagram.

Creates a new datagram, bootstrapped with imported symbol tables.

public IonDatagram
newDatagram(IonCatalog catalog, SymbolTable... imports)

public IonLoader
newLoader()

Implements com.amazon.ion.IonSystem.newLoader.

Constructs a new loader instance using the default system catalog.

public IonLoader
newLoader(IonCatalog
may be null, in which case the loader will use the default system catalog.
catalog
)

Implements com.amazon.ion.IonSystem.newLoader.

Constructs a new loader instance using the given catalog.

public SymbolTable
newLocalSymbolTable(SymbolTable...
the set of shared symbol tables to import. The first (and only the first) may be a system table.
imports
)

Implements com.amazon.ion.IonSystem.newLocalSymbolTable.

Creates a new local symbol table based on specific imported tables.

public IonReader
newReader(byte[]
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.
ionData
)

Implements com.amazon.ion.IonSystem.newReader.

Creates an new IonReader instance over a block of Ion data, detecting whether it's text or binary data.

public IonReader
newReader(byte[]
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.
ionData
,
int
must be non-negative and less than ionData.length.
offset
,
int
must be non-negative and offset+len must not exceed ionData.length.
len
)

Implements com.amazon.ion.IonSystem.newReader.

Creates an new IonReader instance over a block of Ion data, detecting whether it's text or binary data.

public IonTextReader
newReader(String
must not be null.
ionText
)

Implements com.amazon.ion.IonSystem.newReader.

References Deprecated IonTextReader is deprecated or references (maybe indirectly) at least one deprecated element.

Creates an new IonReader instance over Ion text data.

public IonReader
newReader(InputStream
must not be null.
ionData
)

Implements com.amazon.ion.IonSystem.newReader.

Creates a new IonReader instance over a stream of Ion data, detecting whether it's text or binary data.

public IonReader
newReader(Reader ionText)

Implements com.amazon.ion.IonSystem.newReader.

Creates an new IonReader instance over Ion text data.

public IonReader
newReader(IonValue
must not be null.
value
)

Implements com.amazon.ion.IonSystem.newReader.

Creates an new IonReader instance over an IonValue data model.

public SymbolTable
public SymbolTable
newSharedSymbolTable(IonReader
must not be null.
reader
)

Implements com.amazon.ion.IonSystem.newSharedSymbolTable.

Materializes a shared symbol table from its serialized form.

public SymbolTable
newSharedSymbolTable(IonReader
must not be null.
reader
,
boolean
is true if the caller has aleady next-ed onto the struct, false if a next call is needed
isOnStruct
)

Implements com.amazon.ion.IonSystem.newSharedSymbolTable.

Materializes a shared symbol table from its serialized form.

public SymbolTable
newSharedSymbolTable(String
the symbol table name, a non-empty string.
name
,
int
at least one.
version
,
Iterator<String>
provides symbol names; may be null.
newSymbols
,
SymbolTable...
other tables from which to import symbols.
imports
)

Implements com.amazon.ion.IonSystem.newSharedSymbolTable.

Creates a new shared symbol table containing a given set of symbols.

protected IonSymbolLite
newSystemIdSymbol(String ionVersionMarker)

public IonReader
public IonReader
newSystemReader(byte[] ionData, int offset, int len)

Implements com.amazon.ion.impl._Private_IonSystem.newSystemReader.

public IonReader
public IonReader
public IonReader
public IonReader
public IonWriter
newTextWriter(Appendable
the stream that will receive Ion text data. Must not be null.
out
)

Implements com.amazon.ion.IonSystem.newTextWriter.

Creates a new writer that will write text to the given output stream.

public IonWriter
newTextWriter(Appendable
the stream that will receive Ion text data. Must not be null.
out
,
SymbolTable...
a sequence of shared symbol tables. The first (and only the first) may be a system table.
imports
)

Implements com.amazon.ion.IonSystem.newTextWriter.

Creates a new writer that will write text to the given output stream, using the given shared symbol tables as imports.

public IonWriter
newTextWriter(OutputStream
the stream that will receive UTF-8 Ion text data. Must not be null.
out
)

Implements com.amazon.ion.IonSystem.newTextWriter.

Creates a new writer that will write UTF-8 text to the given output stream.

public IonWriter
newTextWriter(OutputStream
the stream that will receive UTF-8 Ion text data. Must not be null.
out
,
SymbolTable...
a sequence of shared symbol tables
imports
)

Implements com.amazon.ion.IonSystem.newTextWriter.

Creates a new writer that will write UTF-8 text to the given output stream, using the given shared symbol tables as imports.

public IonWriter
public IonWriter
public IonTimestamp
newUtcTimestamp(Date
the time of the new instance; may be null to make null.timestamp.
utcDate
)

Implements com.amazon.ion.IonSystem.newUtcTimestamp.

Constructs a new UTC timestamp instance initialized so that it represents the given time.

public IonTimestamp
newUtcTimestampFromMillis(long
the milliseconds since 1970-01-01T00:00:00Z.
millis
)

Implements com.amazon.ion.IonSystem.newUtcTimestampFromMillis.

Constructs a new UTC timestamp initialized to represent the specified number of milliseconds since the standard base time known as "the epoch", namely 1970-01-01T00:00:00Z.

public IonValueLite
newValue(IonReader reader)

Implements com.amazon.ion.IonSystem.newValue.

Extracts the current value from a reader into an IonValue.

pack-priv IonValueLite
newValue(IonType valueType)

public IonWriter
newWriter(IonContainer
a container that will receive new children from the the returned writer. Must not be null.
container
)

Implements com.amazon.ion.IonSystem.newWriter.

Creates a new writer that will add IonValues to the given container.

private IonValue
public IonValue
singleValue(String
must not be null.
ionText
)

Implements com.amazon.ion.IonSystem.singleValue.

Extracts a single value from Ion text data.

public IonValue
singleValue(byte[]
may be either Ion binary data or (UTF-8) Ion text, or GZIPped Ion data. This method assumes ownership of the array and may modify it at will.
ionData
)

Implements com.amazon.ion.IonSystem.singleValue.

Extracts a single value from Ion text or binary data.

public IonValue
singleValue(byte[]
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.
ionData
,
int
must be non-negative and less than ionData.length.
offset
,
int
must be non-negative and offset+len must not exceed
len
)

Implements com.amazon.ion.IonSystem.singleValue.

Extracts a single value from Ion text or binary data.

public Iterator<IonValue>
systemIterate(Reader ionText)

Implements com.amazon.ion.impl._Private_IonSystem.systemIterate.

TODO Must correct amazon-ion/ion-java/issues/63 before exposing this or using from public API.

public Iterator<IonValue>
systemIterate(String ionText)

Implements com.amazon.ion.impl._Private_IonSystem.systemIterate.

TODO Must correct amazon-ion/ion-java/issues/63 before exposing this or using from public API.

public Iterator<IonValue>
public boolean
Inherited from com.amazon.ion.impl.lite.ValueFactoryLite:
getLstFactorynewBlobnewBlobnewBoolnewBoolnewClobnewClobnewDecimalnewDecimalnewDecimalnewDecimalnewEmptyListnewEmptySexpnewEmptyStructnewFloatnewFloatnewIntnewIntnewIntnewListnewListnewListnewListnewListnewNullnewNullnewNullBlobnewNullBoolnewNullClobnewNullDecimalnewNullFloatnewNullIntnewNullListnewNullSexpnewNullStringnewNullStructnewNullSymbolnewNullTimestampnewSexpnewSexpnewSexpnewSexpnewSexpnewStringnewSymbolnewSymbolnewTimestampset_system