Warning
This interface should not be implemented or extended by code outside of this library. Some inherited methods are not yet implemented or are unsupported for datagrams.
Along with the normal user values, datagrams contain system values, notably
the symbol table(s) used to atomize all symbols. Most uses of a datagram
will not see system values,
but applications that need visibility into that data can use the
system*() methods.
| Modifier and Type | Method and Description |
|---|---|
| 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)Redeclares com. This inherited method is not yet supported by datagrams. |
| public ValueFactory | add(int
element to be appended to this list index)Redeclares com. This inherited method is not yet supported by datagrams. |
| 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)Redeclares com. This inherited method is not yet supported by datagrams. |
| public void | addTypeAnnotation(String
as a string value. annotation)Redeclares com. This inherited method is not supported by datagrams. |
| public int | Returns: the number of bytes in the binary encoding of this datagram.Gets the number of bytes used to encode this datagram. |
| public IonDatagram | clone()
Redeclares com. Creates a copy of this value and all of its children. |
| public IonValue | Returns: the selected element; notnull.must be less than index).Redeclares com. Gets a selected non-system element from this datagram. |
| public byte[] | Returns: a new, non-empty byte array containing the encoded datagram.Copies the binary-encoded form of this datagram into a new byte array. |
| public int | Returns: the number of bytes copied intodst.the array into which bytes are to be written. dst)
Deprecated
Copies the binary-encoded form of this datagram into a given array. |
| public int | Returns: the number of bytes copied intodst.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 offset)dst.length
Deprecated
Copies the binary-encoded form of this datagram into a given sub-array. |
| public int | Returns: the number of bytes written.the output stream to which to write the data. out)Copies the binary-encoded form of this datagram to a specified stream. |
| public IonContainer | getContainer()
Redeclares com. Gets the container of this value,
or |
| public SymbolTable | Returns: nothing, always throws an exception.Redeclares com. This inherited method is not supported by datagrams because there's no single symbol table used across the contents. |
| public boolean | Returns: falseRedeclares com. Returns |
| public Iterator | iterator()
Redeclares com. Creates an iterator providing the (direct) elements of this datagram. |
| public void | makeNull()
Redeclares com. This inherited method is not supported by datagrams. |
| public IonValue | set(int
index of the element to replace. index, IonValue element to be stored at the specified position. element)Redeclares com. This inherited method is not yet supported by datagrams. |
| public int | size()
Redeclares com. Gets the number of elements in the datagram, not counting system elements. |
| public IonValue | Returns: the selected element; notnull.must be less than index).Gets a selected element from this datagram, potentially getting a hidden system element (such as a symbol table). |
| public ListIterator | Returns: not null.Iterate all values in the datagram, including the otherwise-hidden system values such as version markers and symbol tables. |
| public int | systemSize()
Gets the number of elements in the datagram, including system elements such as version markers and symbol tables. |
| public byte[] | Returns: a new, non-empty byte array containing the encoded datagram.
Deprecated
Use
getBytes() instead, which is renamed for consistency with other interfaces.
Copies the binary-encoded form of this datagram into a new byte array. |
| add | back to summary |
|---|---|
| public void add(int index, IonValue element) throws ContainedValueException, NullPointerException Redeclares com. This inherited method is not yet supported by datagrams. Vote for issue amazon-ion/ion-java/issues/48 if you need this.
| |
| add | back to summary |
|---|---|
| public ValueFactory add(int index) throws ContainedValueException, NullPointerException Redeclares com. This inherited method is not yet supported by datagrams. Vote for issue amazon-ion/ion-java/issues/48 if you need this.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(int index, Collection<? extends IonValue> c) Redeclares com. This inherited method is not yet supported by datagrams. Vote for issue amazon-ion/ion-java/issues/47 if you need this.
| |
| addTypeAnnotation | back to summary |
|---|---|
| public void addTypeAnnotation(String annotation) Redeclares com. This inherited method is not supported by datagrams.
| |
| byteSize | back to summary |
|---|---|
| public int byteSize() throws IonException Gets the number of bytes used to encode this datagram. As a side effect, this method encodes the entire datagram into Ion binary format.
| |
| clone | back to summary |
|---|---|
| public IonDatagram clone() throws UnknownSymbolException Redeclares com. Doc from com. Creates a copy of this value and all of its children. The cloned value
may use the same shared symbol tables, but it will have an independent local
symbol table if necessary. The cloned value will
be modifiable regardless of whether this instance
The cloned value will be created in the context of the same
| |
| get | back to summary |
|---|---|
| public IonValue get(int index) throws IndexOutOfBoundsException Redeclares com. Gets a selected non-system element from this datagram.
| |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() throws IonException Copies the binary-encoded form of this datagram into a new byte array.
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(byte[] dst) throws IonException
Deprecated
Copies the binary-encoded form of this datagram into a given array. The given array must be large enough to contain all the bytes of this datagram.
An invocation of this method of the form
dg.get(a, 0)
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(byte[] dst, int offset) throws IonException
Deprecated
Copies the binary-encoded form of this datagram into a given sub-array. The given subarray must be large enough to contain all the bytes of this datagram.
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(OutputStream out) throws IOException, IonException Copies the binary-encoded form of this datagram to a specified stream.
| |
| getContainer | back to summary |
|---|---|
| public IonContainer getContainer() Redeclares com. Doc from com. Gets the container of this value,
or
Datagrams always return | |
| getSymbolTable | back to summary |
|---|---|
| public SymbolTable getSymbolTable() Redeclares com. This inherited method is not supported by datagrams because there's no single symbol table used across the contents. Each value contained by the datagram may have its own symbol table.
| |
| isNullValue | back to summary |
|---|---|
| public boolean isNullValue() Redeclares com. Returns
| |
| iterator | back to summary |
|---|---|
| public Iterator Redeclares com. Creates an iterator providing the (direct) elements of this datagram. Elements will be returned in order of their appearance in the Ion representation.
This iterator returns only user values, ignoring symbol tables and other
system values. It does not support the
| |
| makeNull | back to summary |
|---|---|
| public void makeNull() Redeclares com. This inherited method is not supported by datagrams.
| |
| set | back to summary |
|---|---|
| public IonValue set(int index, IonValue element) Redeclares com. This inherited method is not yet supported by datagrams. Vote for issue amazon-ion/ion-java/issues/50 if you need this.
| |
| size | back to summary |
|---|---|
| public int size() Redeclares com. Gets the number of elements in the datagram, not counting system elements.
| |
| systemGet | back to summary |
|---|---|
| public IonValue systemGet(int index) throws IndexOutOfBoundsException Gets a selected element from this datagram, potentially getting a
hidden system element (such as a symbol table).
Unless your application needs to be aware of such low-level details,
you almost certainly want to use
| |
| systemIterator | back to summary |
|---|---|
| public ListIterator Iterate all values in the datagram, including the otherwise-hidden
system values such as version markers and symbol tables.
Unless your application needs to be aware of such low-level details,
you almost certainly want to use
This iterator does not support the modification methods
| |
| systemSize | back to summary |
|---|---|
| public int systemSize() Gets the number of elements in the datagram, including system elements
such as version markers and symbol tables.
Unless your application needs to be aware of such low-level details,
you almost certainly want to use
| |
| toBytes | back to summary |
|---|---|
| public byte[] toBytes() throws IonException
Deprecated Use Copies the binary-encoded form of this datagram into a new byte array.
| |