Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • TextReader

Implements

Index

Constructors

constructor

Methods

_stringRepresentation

  • _stringRepresentation(): null | string

annotations

  • annotations(): string[]
  • Returns the annotations for the current value.

    Returns string[]

    the empty array if the there are no annotations or the reader is not positioned on a value.

bigIntValue

  • bigIntValue(): null | bigint
  • Returns the current value as a BigInt. This is only valid if type() == IonTypes.INT.

    Returns null | bigint

    null if the current Ion value isNull or a BigInt containing the deserialized integer.

booleanValue

  • booleanValue(): null | boolean

decimalValue

depth

  • depth(): number

fieldName

  • fieldName(): null | string
  • Returns the field name of the current value.

    Returns null | string

    null if the reader is not positioned on a value or is on a value that has no field name.

intSize

isIVM

  • isIVM(input: string, depth: number, annotations: string[]): boolean

isLikeIVM

  • isLikeIVM(): boolean

isNull

  • isNull(): boolean

load_raw

  • load_raw(): void

next

  • Advances the reader to the next value in the stream at the current depth.

    Returns null | IonType

    The corresponding IonType of the value the reader moves to, or null if the reader is at the end of the stream or container.

numberValue

  • numberValue(): null | number
  • Returns the current value as a number. This is only valid if type() == IonTypes.INT or type() == IonTypes.FLOAT.

    Returns null | number

    null if the current Ion value isNull. For int values that are outside of the range specified by Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER, this method will truncate the result.

position

  • position(): number
  • Returns the Reader's offset from the beginning of its input.

    For binary Readers, the return value is the number of bytes that have been processed.

    For text Readers, the return value is the number of UTF-16 code units that have been processed, regardless of the input's original encoding. For more on JavaScript's in-memory representation of text, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length#Description

    Note that a Reader cannot safely skip to a given position in input without processing the stream leading up to that position. This is because there are mid-stream system level values that must be processed to guarantee that the Reader is in a valid state. It is safe, however, to start at the beginning of a data source and call next() until you reach the desired position, as the reader will still have the opportunity to process system-level values along the way.

    Returns number

    the number of bytes or UTF-16 code units that the reader has processed.

skip_past_container

  • skip_past_container(): void

stepIn

  • stepIn(): void
  • Steps into the container the reader is currently positioned on. Note that this positions the reader before the first value within the container.

    Returns void

stepOut

  • stepOut(): void
  • Steps out of the current container. This is only valid when the reader is inside of a container (i.e. depth() > 0). Note that the positions the reader after the container that was stepped out of, but before the next value after the container. One should generally call next after invoking this method.

    Returns void

stringValue

  • stringValue(): null | string
  • Returns the current value as a string. This is only valid if type() == IonTypes.STRING or type() == IonTypes.SYMBOL.

    Returns null | string

    null if the current Ion value isNull.

timestampValue

type

uInt8ArrayValue

  • uInt8ArrayValue(): null | Uint8Array
  • Returns the current value as a Uint8Array. This is only valid if type() == IonTypes.CLOB or type() == IonTypes.BLOB.

    Returns null | Uint8Array

    null if the current Ion value isNull.

value

  • value(): any
  • Returns the current scalar value. This is only valid when type().scalar == true.

    Returns any

    null if the current value is isNull, equivalent to the corresponding xxxValue methods for all scalar types.