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

pack-priv Class IonReaderContinuableCoreBinary

extends IonCursorBinary
implements IonReaderContinuableCore
Class Inheritance
All Implemented Interfaces
com.amazon.ion.impl.IonReaderContinuableCore, com.amazon.ion.IonCursor, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
com.amazon.ion.impl.IonReaderContinuableApplicationBinary
Imports
com.amazon.ion.Decimal, .IntegerSize, .IonBufferConfiguration, .IonException, .IonType, .Timestamp, com.amazon.ion.impl.bin.IntList, com.amazon.ion.impl.bin.utf8.Utf8StringDecoder, .Utf8StringDecoderPool, java.io.InputStream, java.math.BigDecimal, .BigInteger, java.nio.ByteBuffer, java.util.Date

An IonCursor capable of raw parsing of binary Ion streams.

Field Summary

Modifier and TypeField and Description
private static final int
private final IntList
private static final int
private static final int
private static final int
private int
private static final int
private static final int
private static final int
private static final int
private static final int
pack-priv long
private final _Private_ScalarConversions.ValueVariant
private final byte[][]
private static final int
pack-priv final Utf8StringDecoder
private static final int
private static final int
private static final int
private static final int
Inherited from com.amazon.ion.impl.IonCursorBinary:
annotationSequenceMarkerbufferbyteBuffercontainerIndexcontainerStackeventfieldSidhasAnnotationsisSlowModeisValueIncompletelimitminorVersionparentvalueMarkervaluePreHeaderIndexvalueTid

Constructor Summary

AccessConstructor and Description
pack-priv
IonReaderContinuableCoreBinary(IonBufferConfiguration
the configuration to use. The buffer size and oversized value configuration are unused, as the given buffer is used directly.
configuration
,
byte[]
the byte array containing the bytes to read.
bytes
,
int
the offset into the byte array at which the first byte of Ion data begins.
offset
,
int
the number of bytes to be read from the byte array.
length
)

Constructs a new reader from the given byte array.

pack-priv
IonReaderContinuableCoreBinary(IonBufferConfiguration
the configuration to use.
configuration
,
InputStream inputStream, byte[]
the byte array containing the bytes already read (often the IVM).
alreadyRead
,
int
the offset into `alreadyRead` at which the first byte that was already read exists.
alreadyReadOff
,
int
the number of bytes already read from `alreadyRead`.
alreadyReadLen
)

Constructs a new reader from the given input stream.

Method Summary

Modifier and TypeMethod and Description
public BigDecimal
public BigInteger
public boolean
booleanValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.booleanValue.

Returns the current value as an boolean.

public int
byteSize()

Implements com.amazon.ion.impl.IonReaderContinuableCore.byteSize.

Gets the size in bytes of the current lob value.

private boolean

Returns:

true if the value fits in the Java integer type that matches its Ion serialized size; false if it requires the next larger size.
classifyInteger_1_0
()

Determines whether the integer starting at `valueMarker.startIndex` and ending at `valueMarker.endIndex` crosses a type boundary.

public void
close()

Overrides com.amazon.ion.impl.IonCursorBinary.close.

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

private byte[]

Returns:

the scratch byte array.
copyBytesToScratch
(long
the start index from which to copy.
startIndex
,
int
the number of bytes to copy.
length
)

Copy the requested number of bytes from the buffer into a scratch buffer of exactly the requested length.

public Date
public Decimal
decimalValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.decimalValue.

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

public double
doubleValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.doubleValue.

Returns the current value as a double.

private int

Returns:

-1 if the most significant bit was set; otherwise, 1.
getAndClearSignBit_1_0
(byte[]
bytes representing a signed int.
intBytes
)

Get and clear the most significant bit in the given byte array.

public int[]
getAnnotationIds()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getAnnotationIds.

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

pack-priv IntList

Returns:

the annotation symbol IDs, or an empty list if the current value is not annotated.
getAnnotationSidList
()

Gets the annotation symbol IDs for the current value, reading them from the buffer first if necessary.

public int
getBytes(byte[]
destination to copy the value into, this must not be null.
bytes
,
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
)

Implements com.amazon.ion.impl.IonReaderContinuableCore.getBytes.

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

public int
getDepth()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getDepth.

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

public int
getFieldId()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getFieldId.

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

public IntegerSize
getIntegerSize()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getIntegerSize.

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

public IonType
getType()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getType.

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

public int
intValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.intValue.

Returns the current value as an int.

public boolean
isInStruct()

Implements com.amazon.ion.impl.IonReaderContinuableCore.isInStruct.

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

public boolean
isNullValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.isNullValue.

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

public long
longValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.longValue.

Returns the current value as a long.

public byte[]
newBytes()

Implements com.amazon.ion.impl.IonReaderContinuableCore.newBytes.

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

public IonCursor.Event
nextValue()

Overrides com.amazon.ion.impl.IonCursorBinary.nextValue.

Implements com.amazon.ion.IonCursor.nextValue.

Advances the cursor to the next value, skipping the current value (if any).

pack-priv ByteBuffer

Returns:

the ByteBuffer.
prepareByteBuffer
(long
the start of the slice.
startIndex
,
long
the end of the slice.
endIndex
)

Prepares the ByteBuffer to wrap a slice of the underlying buffer.

pack-priv void
prepareScalar()

Performs any logic necessary to prepare a scalar value for parsing.

private void
prepareToConvertIntValue()

Loads the scalar converter with an integer value that fits the Ion int on which the reader is positioned.

private BigDecimal

Returns:

the value.
readBigDecimal_1_0
()

Reads into a BigDecimal the decimal value that begins at `peekIndex` and ends at `valueMarker.endIndex`.

private BigDecimal
private BigInteger

Returns:

the value.
readBigInteger_1_0
()

Reads into a BigInteger the integer value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

private BigInteger
private boolean

Returns:

the value.
readBoolean_1_0
()

Reads the boolean value using the type ID of the current value.

private boolean
private Decimal

Returns:

the value.
readDecimal_1_0
()

Reads into a Decimal the decimal value that begins at `peekIndex` and ends at `valueMarker.endIndex`.

private Decimal
private BigInteger

Returns:

the value.
readIntAsBigInteger_1_0
(int
the length of the value.
length
)

Reads the Int value of the given length that begins at `peekIndex` into a BigInteger.

private long

Returns:

the value.
readLong_1_0
()

Reads into a long the integer value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

private long
private Timestamp

Returns:

the value.
readTimestamp_1_0
()

Reads the timestamp that begins at `peekIndex` and ends at `valueMarker.endIndex`.

private Timestamp
private long

Returns:

the value.
readUInt
(long
the index of the first byte in the UInt value.
startIndex
,
long
the index of the first byte after the end of the UInt value.
endIndex
)

Reads a UInt.

private BigInteger

Returns:

the value.
readUIntAsBigInteger
(boolean
true if the resulting BigInteger value should be negative; false if it should be positive.
isNegative
)

Reads into a BigInteger the UInt value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

private int

Returns:

the value.
readVarInt_1_0
(int
the first byte of the VarInt representation, which has already been retrieved from the buffer.
firstByte
)

Reads a 2+ byte VarInt, given the first byte.

private int

Returns:

the value.
readVarInt_1_0
()

Reads the VarInt starting at `peekIndex`.

private int
pack-priv int

Returns:

the value.
readVarUInt_1_0
()

Reads the VarUInt starting at `peekIndex`.

pack-priv int
public String
stringValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.stringValue.

Returns the current value as a Java String.

public int
symbolValueId()

Implements com.amazon.ion.impl.IonReaderContinuableCore.symbolValueId.

Gets the symbol ID of the current symbol value.

private void
public Timestamp
Inherited from com.amazon.ion.impl.IonCursorBinary:
endStreamfillValuegetCurrentEventgetIonMajorVersiongetIonMinorVersiongetTotalOffsetgetValueMarkerhasAnnotationsisByteBackednextPowerOfTworegisterIvmNotificationConsumerregisterOversizedValueHandlerskipRemainingDelimitedContainerElements_1_1slicestepIntoContainerstepOutOfContainerterminate

Field Detail

ANNOTATIONS_LIST_INITIAL_CAPACITYback to summary
private static final int ANNOTATIONS_LIST_INITIAL_CAPACITY
annotationSidsback to summary
private final IntList annotationSids
FLOAT_32_BYTE_LENGTHback to summary
private static final int FLOAT_32_BYTE_LENGTH
HIGHEST_BIT_BITMASKback to summary
private static final int HIGHEST_BIT_BITMASK

Hides com.amazon.ion.impl.IonCursorBinary.HIGHEST_BIT_BITMASK.

INT_SIZE_IN_BYTESback to summary
private static final int INT_SIZE_IN_BYTES
lobBytesReadback to summary
private int lobBytesRead
LONG_SIZE_IN_BYTESback to summary
private static final int LONG_SIZE_IN_BYTES
LOWER_SEVEN_BITS_BITMASKback to summary
private static final int LOWER_SEVEN_BITS_BITMASK

Hides com.amazon.ion.impl.IonCursorBinary.LOWER_SEVEN_BITS_BITMASK.

LOWER_SIX_BITS_BITMASKback to summary
private static final int LOWER_SIX_BITS_BITMASK
MOST_SIGNIFICANT_BYTE_OF_MAX_INTEGERback to summary
private static final int MOST_SIGNIFICANT_BYTE_OF_MAX_INTEGER
MOST_SIGNIFICANT_BYTE_OF_MIN_INTEGERback to summary
private static final int MOST_SIGNIFICANT_BYTE_OF_MIN_INTEGER
peekIndexback to summary
pack-priv long peekIndex

Hides com.amazon.ion.impl.IonCursorBinary.peekIndex.

scalarConverterback to summary
private final _Private_ScalarConversions.ValueVariant scalarConverter
scratchForSizeback to summary
private final byte[][] scratchForSize
SINGLE_BYTE_MASKback to summary
private static final int SINGLE_BYTE_MASK

Hides com.amazon.ion.impl.IonCursorBinary.SINGLE_BYTE_MASK.

utf8Decoderback to summary
pack-priv final Utf8StringDecoder utf8Decoder
VALUE_BITS_PER_UINT_BYTEback to summary
private static final int VALUE_BITS_PER_UINT_BYTE
VALUE_BITS_PER_VARUINT_BYTEback to summary
private static final int VALUE_BITS_PER_VARUINT_BYTE

Hides com.amazon.ion.impl.IonCursorBinary.VALUE_BITS_PER_VARUINT_BYTE.

VAR_INT_NEGATIVE_ZEROback to summary
private static final int VAR_INT_NEGATIVE_ZERO
VAR_INT_SIGN_BITMASKback to summary
private static final int VAR_INT_SIGN_BITMASK

Constructor Detail

IonReaderContinuableCoreBinaryback to summary
pack-priv IonReaderContinuableCoreBinary(IonBufferConfiguration configuration, byte[] bytes, int offset, int length)

Constructs a new reader from the given byte array.

Parameters
configuration:IonBufferConfiguration

the configuration to use. The buffer size and oversized value configuration are unused, as the given buffer is used directly.

bytes:byte[]

the byte array containing the bytes to read.

offset:int

the offset into the byte array at which the first byte of Ion data begins.

length:int

the number of bytes to be read from the byte array.

IonReaderContinuableCoreBinaryback to summary
pack-priv IonReaderContinuableCoreBinary(IonBufferConfiguration configuration, InputStream inputStream, byte[] alreadyRead, int alreadyReadOff, int alreadyReadLen)

Constructs a new reader from the given input stream.

Parameters
configuration:IonBufferConfiguration

the configuration to use.

alreadyRead:byte[]

the byte array containing the bytes already read (often the IVM).

alreadyReadOff:int

the offset into `alreadyRead` at which the first byte that was already read exists.

alreadyReadLen:int

the number of bytes already read from `alreadyRead`.

Method Detail

bigDecimalValueback to summary
public BigDecimal bigDecimalValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.bigDecimalValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
bigIntegerValueback to summary
public BigInteger bigIntegerValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.bigIntegerValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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).

Annotations
@Override
booleanValueback to summary
public boolean booleanValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.booleanValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.booleanValue.

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

Annotations
@Override
byteSizeback to summary
public int byteSize()

Implements com.amazon.ion.impl.IonReaderContinuableCore.byteSize.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
classifyInteger_1_0back to summary
private boolean classifyInteger_1_0()

Determines whether the integer starting at `valueMarker.startIndex` and ending at `valueMarker.endIndex` crosses a type boundary. Callers must only invoke this method when the integer's size is known to be either 4 or 8 bytes.

Returns:boolean

true if the value fits in the Java integer type that matches its Ion serialized size; false if it requires the next larger size.

closeback to summary
public void close()

Overrides com.amazon.ion.impl.IonCursorBinary.close.

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
copyBytesToScratchback to summary
private byte[] copyBytesToScratch(long startIndex, int length)

Copy the requested number of bytes from the buffer into a scratch buffer of exactly the requested length.

Parameters
startIndex:long

the start index from which to copy.

length:int

the number of bytes to copy.

Returns:byte[]

the scratch byte array.

dateValueback to summary
public Date dateValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.dateValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
decimalValueback to summary
public Decimal decimalValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.decimalValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
doubleValueback to summary
public double doubleValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.doubleValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
getAndClearSignBit_1_0back to summary
private int getAndClearSignBit_1_0(byte[] intBytes)

Get and clear the most significant bit in the given byte array.

Parameters
intBytes:byte[]

bytes representing a signed int.

Returns:int

-1 if the most significant bit was set; otherwise, 1.

getAnnotationIdsback to summary
public int[] getAnnotationIds()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getAnnotationIds.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.getAnnotationIds.

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
@Override
getAnnotationSidListback to summary
pack-priv IntList getAnnotationSidList()

Gets the annotation symbol IDs for the current value, reading them from the buffer first if necessary.

Returns:IntList

the annotation symbol IDs, or an empty list if the current value is not annotated.

getBytesback to summary
public int getBytes(byte[] bytes, int offset, int len)

Implements com.amazon.ion.impl.IonReaderContinuableCore.getBytes.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.getBytes.

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

Parameters
bytes: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.

Annotations
@Override
getDepthback to summary
public int getDepth()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getDepth.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.getDepth.

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

Annotations
@Override
getFieldIdback to summary
public int getFieldId()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getFieldId.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.getFieldId.

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
@Override
getIntegerSizeback to summary
public IntegerSize getIntegerSize()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getIntegerSize.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
getTypeback to summary
public IonType getType()

Implements com.amazon.ion.impl.IonReaderContinuableCore.getType.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.getType.

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

Annotations
@Override
intValueback to summary
public int intValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.intValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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).

Annotations
@Override
isInStructback to summary
public boolean isInStruct()

Implements com.amazon.ion.impl.IonReaderContinuableCore.isInStruct.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override
isNullValueback to summary
public boolean isNullValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.isNullValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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).

Annotations
@Override
longValueback to summary
public long longValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.longValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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).

Annotations
@Override
newBytesback to summary
public byte[] newBytes()

Implements com.amazon.ion.impl.IonReaderContinuableCore.newBytes.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.newBytes.

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

Annotations
@Override
nextValueback to summary
public IonCursor.Event nextValue()

Overrides com.amazon.ion.impl.IonCursorBinary.nextValue.

Implements com.amazon.ion.IonCursor.nextValue.

Doc from com.amazon.ion.IonCursor.nextValue.

Advances the cursor to the next value, skipping the current value (if any). This method may return:

  • NEEDS_DATA, if not enough data is available in the stream
  • START_SCALAR, if the reader is now positioned on a scalar value
  • START_CONTAINER, if the reader is now positioned on a container value
  • END_CONTAINER, if the reader is now positioned at the end of a container value, or
  • NEEDS_INSTRUCTION, if the reader skipped a value for exceeding the configured maximum buffer size
Returns:IonCursor.Event

an Event conveying the result of the operation.

Annotations
@Override
prepareByteBufferback to summary
pack-priv ByteBuffer prepareByteBuffer(long startIndex, long endIndex)

Prepares the ByteBuffer to wrap a slice of the underlying buffer.

Parameters
startIndex:long

the start of the slice.

endIndex:long

the end of the slice.

Returns:ByteBuffer

the ByteBuffer.

prepareScalarback to summary
pack-priv void prepareScalar()

Performs any logic necessary to prepare a scalar value for parsing. Subclasses may wish to provide additional logic, such as ensuring that the value is present in the buffer.

prepareToConvertIntValueback to summary
private void prepareToConvertIntValue()

Loads the scalar converter with an integer value that fits the Ion int on which the reader is positioned.

readBigDecimal_1_0back to summary
private BigDecimal readBigDecimal_1_0()

Reads into a BigDecimal the decimal value that begins at `peekIndex` and ends at `valueMarker.endIndex`.

Returns:BigDecimal

the value.

readBigDecimal_1_1back to summary
private BigDecimal readBigDecimal_1_1()
readBigInteger_1_0back to summary
private BigInteger readBigInteger_1_0()

Reads into a BigInteger the integer value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

Returns:BigInteger

the value.

readBigInteger_1_1back to summary
private BigInteger readBigInteger_1_1()
readBoolean_1_0back to summary
private boolean readBoolean_1_0()

Reads the boolean value using the type ID of the current value.

Returns:boolean

the value.

readBoolean_1_1back to summary
private boolean readBoolean_1_1()
readDecimal_1_0back to summary
private Decimal readDecimal_1_0()

Reads into a Decimal the decimal value that begins at `peekIndex` and ends at `valueMarker.endIndex`.

Returns:Decimal

the value.

readDecimal_1_1back to summary
private Decimal readDecimal_1_1()
readIntAsBigInteger_1_0back to summary
private BigInteger readIntAsBigInteger_1_0(int length)

Reads the Int value of the given length that begins at `peekIndex` into a BigInteger.

Parameters
length:int

the length of the value.

Returns:BigInteger

the value.

readLong_1_0back to summary
private long readLong_1_0()

Reads into a long the integer value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

Returns:long

the value.

readLong_1_1back to summary
private long readLong_1_1()
readTimestamp_1_0back to summary
private Timestamp readTimestamp_1_0()

Reads the timestamp that begins at `peekIndex` and ends at `valueMarker.endIndex`.

Returns:Timestamp

the value.

readTimestamp_1_1back to summary
private Timestamp readTimestamp_1_1()
readUIntback to summary
private long readUInt(long startIndex, long endIndex)

Reads a UInt.

Parameters
startIndex:long

the index of the first byte in the UInt value.

endIndex:long

the index of the first byte after the end of the UInt value.

Returns:long

the value.

readUIntAsBigIntegerback to summary
private BigInteger readUIntAsBigInteger(boolean isNegative)

Reads into a BigInteger the UInt value that begins at `valueMarker.startIndex` and ends at `valueMarker.endIndex`.

Parameters
isNegative:boolean

true if the resulting BigInteger value should be negative; false if it should be positive.

Returns:BigInteger

the value.

readVarInt_1_0back to summary
private int readVarInt_1_0(int firstByte)

Reads a 2+ byte VarInt, given the first byte. When called, `peekIndex` must point at the second byte in the VarInt. at `peekIndex`.When this method returns, `peekIndex` will point at the first byte that follows the VarInt.

Note

the VarInt must fit in an `int`.

Parameters
firstByte:int

the first byte of the VarInt representation, which has already been retrieved from the buffer.

Returns:int

the value.

readVarInt_1_0back to summary
private int readVarInt_1_0()

Reads the VarInt starting at `peekIndex`. When this method returns, `peekIndex` will point at the first byte that follows the VarUInt.

Note

the VarInt must fit in an `int`.

Returns:int

the value.

readVarSym_1_1back to summary
private int readVarSym_1_1(Marker marker)
readVarUInt_1_0back to summary
pack-priv int readVarUInt_1_0()

Reads the VarUInt starting at `peekIndex`. When this method returns, `peekIndex` will point at the first byte that follows the VarUInt.

Note

the VarUInt must fit in an `int`.

Returns:int

the value.

readVarUInt_1_1back to summary
pack-priv int readVarUInt_1_1()
stringValueback to summary
public String stringValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.stringValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.stringValue.

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

Annotations
@Override
symbolValueIdback to summary
public int symbolValueId()

Implements com.amazon.ion.impl.IonReaderContinuableCore.symbolValueId.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.symbolValueId.

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
@Override
throwDueToInvalidTypeback to summary
private void throwDueToInvalidType(IonType type)
timestampValueback to summary
public Timestamp timestampValue()

Implements com.amazon.ion.impl.IonReaderContinuableCore.timestampValue.

Doc from com.amazon.ion.impl.IonReaderContinuableCore.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.

Annotations
@Override