Top Description Methods
com.amazon.ion.impl

pack-priv Interface IonReaderContinuableCore

extends IonCursor
Known Direct Subinterfaces
com.amazon.ion.impl.IonReaderContinuableApplication
Known Direct Implementers
com.amazon.ion.impl.IonReaderContinuableCoreBinary
Imports
com.amazon.ion.Decimal, .IntegerSize, .IonCursor, .IonInt, .IonType, .IvmNotificationConsumer, .Timestamp, .UnknownSymbolException, java.math.BigDecimal, .BigInteger, java.util.Date

IonCursor with the core IonReader interface methods. Useful for adapting an IonCursor implementation into a system-level IonReader.

Method Summary

Modifier and TypeMethod and Description
public BigDecimal

Returns:

the current value as a BigDecimal, or null if the current value is null.decimal.
bigDecimalValue
()

Returns the current value as a BigDecimal.

public BigInteger
bigIntegerValue()

Returns the current value as a BigInteger.

public boolean
booleanValue()

Returns the current value as an boolean.

public int

Returns:

the lob's size in bytes.
byteSize
()

Gets the size in bytes of the current lob value.

public Date

Returns:

the current value as a Date, or null if the current value is null.timestamp.
dateValue
()

Returns the current value as a java.util.Date.

public Decimal

Returns:

the current value as a Decimal, or null if the current value is null.decimal.
decimalValue
()

Returns the current value as a Decimal, which extends BigDecimal with support for negative zeros.

public double
doubleValue()

Returns the current value as a double.

public int[]

Returns:

the symbol IDs of the annotations on the current value. If the current value has no annotations, this method returns an empty array.
getAnnotationIds
()
Deprecated

Gets the symbol IDs of the annotations attached to the current value.

public int
getBytes(byte[]
destination to copy the value into, this must not be null.
buffer
,
int
the first position to copy into, this must be non null and less than the length of buffer.
offset
,
int
the number of bytes available in the buffer to copy into, this must be long enough to hold the whole value and not extend outside of buffer.
len
)

Copies the current value into the passed in a byte array.

public int
getDepth()

Returns the depth into the Ion value that this reader has traversed.

public int

Returns:

the symbol ID of the field name, if the current value is a field within a struct. If the current value is not a field, or if the symbol ID cannot be determined, this method returns a value less than one.
getFieldId
()
Deprecated

Gets the symbol ID of the field name attached to the current value.

public IntegerSize
getIntegerSize()

Returns an IntegerSize representing the smallest-possible Java type of the Ion int at the current value.

public int

Returns:

the major version.
getIonMajorVersion
()

Returns the major version of the Ion stream at the reader's current position.

public int

Returns:

the minor version.
getIonMinorVersion
()

Returns the minor version of the Ion stream at the reader's current position.

public IonType
getType()

Returns the type of the current value, or null if there is no current value.

public boolean

Returns:

true if the value has at least one annotation; otherwise, false.
hasAnnotations
()

Conveys whether the value on which the reader is currently positioned has annotations.

public int
intValue()

Returns the current value as an int.

public boolean
isInStruct()

Determines whether this reader is currently traversing the fields of an Ion struct.

public boolean
isNullValue()

Determines whether the current value is a null Ion value of any type (for example, null or null.int).

public long
longValue()

Returns the current value as a long.

public byte[]
newBytes()

Returns the current value as a newly-allocated byte array.

public void
registerIvmNotificationConsumer(IvmNotificationConsumer
the consumer to be notified.
ivmConsumer
)

Register an IvmNotificationConsumer to be notified whenever the reader encounters an Ion version marker.

public String
stringValue()

Returns the current value as a Java String.

public int

Returns:

the symbol ID of the value. If the symbol ID cannot be determined, this method returns a value less than one.
symbolValueId
()
Deprecated

Gets the symbol ID of the current symbol value.

public Timestamp

Returns:

the current value as a Timestamp, or null if the current value is null.timestamp.
timestampValue
()

Returns the current value as a Timestamp.

Inherited from com.amazon.ion.IonCursor:
endStreamfillValuegetCurrentEventnextValuestepIntoContainerstepOutOfContainer

Method Detail

bigDecimalValueback to summary
public BigDecimal bigDecimalValue()

Returns the current value as a BigDecimal. This method should not return a Decimal, so it lacks support for negative zeros.

This method is only valid when getType() returns IonType#DECIMAL.

Returns:BigDecimal

the current value as a BigDecimal, or null if the current value is null.decimal.

bigIntegerValueback to summary
public BigInteger bigIntegerValue()

Returns the current value as a BigInteger. This is only valid if there is an underlying value and the value is of a numeric type (int, float, or decimal).

booleanValueback to summary
public boolean booleanValue()

Returns the current value as an boolean. This is only valid when getType() returns IonType#BOOL.

byteSizeback to summary
public int byteSize()

Gets the size in bytes of the current lob value. This is only valid when getType() returns IonType#BLOB or IonType#CLOB.

Returns:int

the lob's size in bytes.

dateValueback to summary
public Date dateValue()

Returns the current value as a java.util.Date. This is only valid when getType() returns IonType#TIMESTAMP.

Returns:Date

the current value as a Date, or null if the current value is null.timestamp.

decimalValueback to summary
public Decimal decimalValue()

Returns the current value as a Decimal, which extends BigDecimal with support for negative zeros. This is only valid when getType() returns IonType#DECIMAL.

Returns:Decimal

the current value as a Decimal, or null if the current value is null.decimal.

doubleValueback to summary
public double doubleValue()

Returns the current value as a double. This is only valid if there is an underlying value and the value is either float, or decimal.

getAnnotationIdsback to summary
public int[] getAnnotationIds()

Deprecated

Gets the symbol IDs of the annotations attached to the current value.

This is an "expert method": correct use requires deep understanding of the Ion binary format. You almost certainly don't want to use it.

Returns:int[]

the symbol IDs of the annotations on the current value. If the current value has no annotations, this method returns an empty array.

Annotations
@Deprecated
getBytesback to summary
public int getBytes(byte[] buffer, int offset, int len)

Copies the current value into the passed in a byte array. This is only valid when getType() returns IonType#BLOB or IonType#CLOB.

Parameters
buffer:byte[]

destination to copy the value into, this must not be null.

offset:int

the first position to copy into, this must be non null and less than the length of buffer.

len:int

the number of bytes available in the buffer to copy into, this must be long enough to hold the whole value and not extend outside of buffer.

getDepthback to summary
public int getDepth()

Returns the depth into the Ion value that this reader has traversed. At top level the depth is 0.

getFieldIdback to summary
public int getFieldId()

Deprecated

Gets the symbol ID of the field name attached to the current value.

This is an "expert method": correct use requires deep understanding of the Ion binary format. You almost certainly don't want to use it.

Returns:int

the symbol ID of the field name, if the current value is a field within a struct. If the current value is not a field, or if the symbol ID cannot be determined, this method returns a value less than one.

Annotations
@Deprecated
getIntegerSizeback to summary
public IntegerSize getIntegerSize()

Returns an IntegerSize representing the smallest-possible Java type of the Ion int at the current value. If the current value is null.int or is not an Ion int, or if there is no current value, null will be returned.

See Also
IonInt#getIntegerSize()
getIonMajorVersionback to summary
public int getIonMajorVersion()

Returns the major version of the Ion stream at the reader's current position.

Returns:int

the major version.

getIonMinorVersionback to summary
public int getIonMinorVersion()

Returns the minor version of the Ion stream at the reader's current position.

Returns:int

the minor version.

getTypeback to summary
public IonType getType()

Returns the type of the current value, or null if there is no current value.

hasAnnotationsback to summary
public boolean hasAnnotations()

Conveys whether the value on which the reader is currently positioned has annotations.

Returns:boolean

true if the value has at least one annotation; otherwise, false.

intValueback to summary
public int intValue()

Returns the current value as an int. This is only valid if there is an underlying value and the value is of a numeric type (int, float, or decimal).

isInStructback to summary
public boolean isInStruct()

Determines whether this reader is currently traversing the fields of an Ion struct. It returns false if the iteration is in a list, a sexp, or a datagram.

isNullValueback to summary
public boolean isNullValue()

Determines whether the current value is a null Ion value of any type (for example, null or null.int). It should be called before calling getters that return value types (int, long, boolean, double).

longValueback to summary
public long longValue()

Returns the current value as a long. This is only valid if there is an underlying value and the value is of a numeric type (int, float, or decimal).

newBytesback to summary
public byte[] newBytes()

Returns the current value as a newly-allocated byte array. This is only valid when getType() returns IonType#BLOB or IonType#CLOB.

registerIvmNotificationConsumerback to summary
public void registerIvmNotificationConsumer(IvmNotificationConsumer ivmConsumer)

Register an IvmNotificationConsumer to be notified whenever the reader encounters an Ion version marker.

Parameters
ivmConsumer:IvmNotificationConsumer

the consumer to be notified.

stringValueback to summary
public String stringValue()

Returns the current value as a Java String. This is only valid when getType() returns IonType#STRING or IonType#SYMBOL.

Exceptions
UnknownSymbolException:
if the current value is a symbol with unknown text.
See Also
IonReaderContinuableApplication#symbolValue()
symbolValueIdback to summary
public int symbolValueId()

Deprecated

Gets the symbol ID of the current symbol value.

This is an "expert method": correct use requires deep understanding of the Ion binary format. You almost certainly don't want to use it.

Returns:int

the symbol ID of the value. If the symbol ID cannot be determined, this method returns a value less than one.

Annotations
@Deprecated
timestampValueback to summary
public Timestamp timestampValue()

Returns the current value as a Timestamp. This is only valid when getType() returns IonType#TIMESTAMP.

Returns:Timestamp

the current value as a Timestamp, or null if the current value is null.timestamp.