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

pack-priv final Class IonDatagramLite

extends IonSequenceLite
implements IonDatagram, IonContext, _Private_IonDatagram
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl._Private_IonDatagram, com.amazon.ion.IonDatagram, com.amazon.ion.IonSequence, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable, com.amazon.ion.IonContainer, com.amazon.ion.IonValue, java.lang.Cloneable, com.amazon.ion.impl._Private_IonValue, com.amazon.ion.impl.lite.IonContext
Static Imports
com.amazon.ion.SystemSymbols.ION_1_0

The datagram generally behaves as an IonSexp. A list with space separated values. As a user datagram it only shows user values as current members of the list. As a system datagram it also includes system values (adding Ion version marker symbols and local symbol tables to the list). Most API's operate on the user view. The exceptions are getBytes (and related), and the system* API's. These synthesize a system view over the user values. When system values are added they translate into setsymboltableat operations. Which sets a pending symbol table at the current user position (as specified by the add pos). When the next add occurs if it is at the specified position the pending symbol table is applied to the value if the value doesn't already have a local symbol table defined. in any event any membership update invalidates the pending symbol table. In general on add if there is no pending symbol table the preceding value local symbol table is applied as the local symbol table to the new value, if it needs one. The system iterator inserts system values to create the minimum additional values to represent a correct Ion sequence by injecting IVM's when the symbol table transitions to system, and local symbol tables when they first occur.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
IonDatagramLite.SystemContentIterator

Encapsulates an iterator and implements a custom remove method this is tied to the _child array of the IonSequenceImpl through the _children and _child_count members which this iterator directly uses.

pack-priv static class

Field Summary

Modifier and TypeField and Description
private final IonCatalog
private IonSymbolLite
private SymbolTable
private int
private final IonSystemLite
private static final int
private static final int
Inherited from com.amazon.ion.impl.lite.IonSequenceLite:
EMPTY_VALUE_ARRAY

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
accept(ValueVisitor
will have one of its visit methods called.
visitor
)

Implements abstract com.amazon.ion.impl.lite.IonContainerLite.accept.

Implements com.amazon.ion.IonValue.accept.

Entry point for visitor pattern.

public boolean
add(IonValue
is the value to be appended to this sequence.
child
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.add.

Implements com.amazon.ion.IonSequence.add.

Appends a child value to the end of this sequence.

public ValueFactory
add()

Overrides com.amazon.ion.impl.lite.IonSequenceLite.add.

Implements com.amazon.ion.IonSequence.add.

Provides a factory that when invoked constructs a new value and adds it to this sequence.

public void
add(int
index at which the specified element is to be inserted
index
,
IonValue
is the element to be appended to this sequence.
element
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.add.

Implements com.amazon.ion.IonDatagram.add, com.amazon.ion.IonSequence.add.

This inherited method is not yet supported by datagrams.

public ValueFactory
add(final int
element to be appended to this list
index
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.add.

Implements com.amazon.ion.IonDatagram.add, com.amazon.ion.IonSequence.add.

This inherited method is not yet supported by datagrams.

public boolean
addAll(Collection<? extends IonValue>
elements to be appended to this sequence.
c
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.addAll.

Implements com.amazon.ion.IonSequence.addAll.

Appends all of the elements in the specified collection to the end of this sequence, in the order that they are returned by the collection's iterator.

public boolean
addAll(int
index at which to insert first element from the specified collection.
index
,
Collection<? extends IonValue>
elements to be inserted into this sequence.
c
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.addAll.

Implements com.amazon.ion.IonDatagram.addAll, com.amazon.ion.IonSequence.addAll.

This inherited method is not yet supported by datagrams.

public void
addTypeAnnotation(String
as a string value.
annotation
)

Overrides com.amazon.ion.impl.lite.IonValueLite.addTypeAnnotation.

Implements com.amazon.ion.IonDatagram.addTypeAnnotation, com.amazon.ion.IonValue.addTypeAnnotation.

This inherited method is not supported by datagrams.

public void
public int
byteSize()

Implements com.amazon.ion.IonDatagram.byteSize.

Gets the number of bytes used to encode this datagram.

public IonDatagram
public <T extends IonValue> T[]
extract(Class<T> type)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.extract.

Implements com.amazon.ion.IonSequence.extract.

Removes all children of this sequence, returning them in an array.

protected synchronized IonSymbolLite
public SymbolTable
getAssignedSymbolTable()

Overrides com.amazon.ion.impl.lite.IonValueLite.getAssignedSymbolTable.

Implements com.amazon.ion.impl._Private_IonValue.getAssignedSymbolTable.

Returns the symbol table that is directly associated with this value, without doing any recursive lookup.

public byte[]
getBytes()

Implements com.amazon.ion.IonDatagram.getBytes.

Copies the binary-encoded form of this datagram into a new byte array.

public int
getBytes(byte[]
the array into which bytes are to be written.
dst
)

Implements com.amazon.ion.IonDatagram.getBytes.

Copies the binary-encoded form of this datagram into a given array.

public int
getBytes(byte[]
the array into which bytes are to be written.
dst
,
int
the offset within the array of the first byte to be written; must be non-negative and no larger than dst.length
offset
)

Implements com.amazon.ion.IonDatagram.getBytes.

Copies the binary-encoded form of this datagram into a given sub-array.

public int
getBytes(OutputStream
the output stream to which to write the data.
out
)

Implements com.amazon.ion.IonDatagram.getBytes.

Copies the binary-encoded form of this datagram to a specified stream.

public IonContainerLite
getContainer()

Overrides com.amazon.ion.impl.lite.IonValueLite.getContainer.

Implements com.amazon.ion.IonDatagram.getContainer, com.amazon.ion.IonValue.getContainer.

Gets the container of this value, or null if this is not part of one.

public IonContext
public SymbolToken
getFieldNameSymbol()

Overrides com.amazon.ion.impl.lite.IonValueLite.getFieldNameSymbol.

Implements com.amazon.ion.IonValue.getFieldNameSymbol.

Gets the field name attached to this value as an interned symbol (text + ID).

public SymbolTable
getSymbolTable()

Overrides com.amazon.ion.impl.lite.IonValueLite.getSymbolTable.

Implements com.amazon.ion.IonDatagram.getSymbolTable, com.amazon.ion.IonValue.getSymbolTable.

This inherited method is not supported by datagrams because there's no single symbol table used across the contents.

public IonSystemLite
getSystem()

Overrides com.amazon.ion.impl.lite.IonContainerLite.getSystem.

Implements com.amazon.ion.IonValue.getSystem, com.amazon.ion.impl.lite.IonContext.getSystem.

Get the IonSystem concrete object that created the IonValue that is associated with this context.

public SymbolToken[]
getTypeAnnotationSymbols()

Overrides com.amazon.ion.impl.lite.IonValueLite.getTypeAnnotationSymbols.

Implements com.amazon.ion.IonValue.getTypeAnnotationSymbols.

Gets this value's user type annotations as interned symbols (text + ID).

public IonType
public int
pack-priv int
public ListIterator<IonValue>
listIterator(int
index of first element to be returned from the list iterator (by a call to the next method).
index
)

Overrides com.amazon.ion.impl.lite.IonContainerLite.listIterator.

Implements com.amazon.ion.IonSequence.listIterator.

Returns a list iterator of the elements in this sequence (in proper order), starting at the specified position in this sequence.

public void
makeReadOnly()

Overrides com.amazon.ion.impl.lite.IonValueLite.makeReadOnly.

Implements com.amazon.ion.IonValue.makeReadOnly.

Marks this instance and its children to be immutable.

public IonValue
set(int
index of the element to replace.
index
,
IonValue
element to be stored at the specified position.
element
)

Overrides com.amazon.ion.impl.lite.IonSequenceLite.set.

Implements com.amazon.ion.IonDatagram.set, com.amazon.ion.IonSequence.set.

This inherited method is not yet supported by datagrams.

public void
setSymbolTable(SymbolTable
must be local or system table. May be null.
symbols
)

Overrides com.amazon.ion.impl.lite.IonValueLite.setSymbolTable.

Implements com.amazon.ion.impl._Private_IonValue.setSymbolTable.

Makes this symbol table current for this value.

pack-priv void
setSymbolTableAtIndex(int elementid, SymbolTable symbols)

pack-priv IonValueLite
shallowClone(IonContext
the context applicable to the value's parent.
context
)

Implements abstract com.amazon.ion.impl.lite.IonValueLite.shallowClone.

Clones the value's annotations and field name (if any).

public IonValue
systemGet(int
must be less than systemSize().
index
)

Implements com.amazon.ion.IonDatagram.systemGet.

Gets a selected element from this datagram, potentially getting a hidden system element (such as a symbol table).

public ListIterator<IonValue>
systemIterator()

Implements com.amazon.ion.IonDatagram.systemIterator.

Iterate all values in the datagram, including the otherwise-hidden system values such as version markers and symbol tables.

public int
systemSize()

Implements com.amazon.ion.IonDatagram.systemSize.

Gets the number of elements in the datagram, including system elements such as version markers and symbol tables.

public byte[]
toBytes()

Implements com.amazon.ion.IonDatagram.toBytes.

Copies the binary-encoded form of this datagram into a new byte array.

public IonValueLite
topLevelValue()

Overrides com.amazon.ion.impl.lite.IonValueLite.topLevelValue.

Implements com.amazon.ion.IonValue.topLevelValue.

Finds the top level value above this value.

public final void
Inherited from com.amazon.ion.impl.lite.IonSequenceLite:
containscontainsAllindexOflastIndexOfremoveremoveremoveAllretainAllsubListtoArraytoArray