Options
All
  • Public
  • Public/Protected
  • All
Menu

Reader helper for Portable objects.

Hierarchy

  • PortableReader

Index

Methods

  • getFieldNames(): string[]
  • Returns string[]

    set of field names on this Portable class

  • throws

    RangeError if the field does not exist.

    Parameters

    • fieldName: string

      name of the field

    Returns FieldType

    field type of given fieldName

  • getVersion(): number
  • Returns number

    global version of Portable classes

  • hasField(fieldName: string): boolean
  • Parameters

    • fieldName: string

      name of the field (does not support nested paths)

    Returns boolean

    true if field exist in this class.

  • readBoolean(fieldName: string): boolean
  • Reads a primitive boolean.

    Parameters

    • fieldName: string

      name of the field

    Returns boolean

    the boolean value read

  • readBooleanArray(fieldName: string): boolean[]
  • Reads an array of primitive booleans.

    Parameters

    • fieldName: string

      name of the field

    Returns boolean[]

    the boolean array value read

  • readByte(fieldName: string): number
  • Reads a 8-bit unsigned integer.

    Parameters

    • fieldName: string

      name of the field

    Returns number

    the byte value read

  • readByteArray(fieldName: string): Buffer
  • Reads an array of bytes.

    Parameters

    • fieldName: string

      name of the field

    Returns Buffer

    the byte array value read

  • readChar(fieldName: string): string
  • Reads a single character string using String.fromCharCode from two bytes of UTF-16 code units.

    Parameters

    • fieldName: string

      name of the field

    Returns string

    the char value read

  • readCharArray(fieldName: string): string[]
  • Reads an array of single character strings. Each of them are read using String.fromCharCode from a two bytes UTF-16 code units.

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

    the char array value read

  • Reads a date.

    Parameters

    • fieldName: string

      name of the field

    Returns LocalDate

    the LocalDate value read

  • readDateArray(fieldName: string): LocalDate[]
  • Reads an array of LocalDates.

    see

    readDate

    Parameters

    • fieldName: string

      name of the field

    Returns LocalDate[]

    the LocalDate array read

  • Reads a decimal.

    Parameters

    • fieldName: string

      name of the field

    Returns BigDecimal

    the BigDecimal value read

  • Reads an array of BigDecimals.

    see

    readDecimal

    Parameters

    • fieldName: string

      name of the field

    Returns BigDecimal[]

    the BigDecimal array read

  • readDouble(fieldName: string): number
  • Reads a double.

    Parameters

    • fieldName: string

      name of the field

    Returns number

    the double value read

  • readDoubleArray(fieldName: string): number[]
  • Reads an array of doubles.

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

    the double array value read

  • readFloat(fieldName: string): number
  • Reads a float.

    Parameters

    • fieldName: string

      name of the field

    Returns number

    the float value read

  • readFloatArray(fieldName: string): number[]
  • Reads an array of floats.

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

    the float array value read

  • readInt(fieldName: string): number
  • Reads a 32-bit signed integer.

    Parameters

    • fieldName: string

      name of the field

    Returns number

    the int value read

  • readIntArray(fieldName: string): number[]
  • Reads an array of 32-bit signed integers.

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

    the int array value read

  • readLong(fieldName: string): Long
  • Reads a long.

    Parameters

    • fieldName: string

      name of the field

    Returns Long

    the long value read

  • readLongArray(fieldName: string): Long[]
  • Reads an array of longs.

    Parameters

    • fieldName: string

      name of the field

    Returns Long[]

    the long array value read

  • readPortable(fieldName: string): Portable
  • Reads a Portable.

    Parameters

    • fieldName: string

      name of the field

    Returns Portable

    the Portable value read

  • readPortableArray(fieldName: string): Portable[]
  • Reads an array of Portables.

    Parameters

    • fieldName: string

      name of the field

    Returns Portable[]

    the Portable array read

  • readShort(fieldName: string): number
  • Reads a 16-bit signed integer.

    Parameters

    • fieldName: string

      name of the field

    Returns number

    the short value read

  • readShortArray(fieldName: string): number[]
  • Reads an array of 16-bit signed integers.

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

    the short array value read

  • readString(fieldName: string): string
  • Reads a string from UTF-8 encoded bytes.

    Parameters

    • fieldName: string

      name of the field

    Returns string

    the string value read

  • readStringArray(fieldName: string): string[]
  • Reads an array of strings. Strings are read using UTF-8 encoding.

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

    the string array value read

  • Reads a time.

    Parameters

    • fieldName: string

      name of the field

    Returns LocalTime

    the LocalTime value read

  • readTimeArray(fieldName: string): LocalTime[]
  • Reads an array of LocalTimes.

    see

    readTime

    Parameters

    • fieldName: string

      name of the field

    Returns LocalTime[]

    the LocalTime array read

  • Reads a timestamp.

    Parameters

    • fieldName: string

      name of the field

    Returns LocalDateTime

    the LocalDateTime value read

  • Reads an array of LocalDateTimes.

    see

    readTimestamp

    Parameters

    • fieldName: string

      name of the field

    Returns LocalDateTime[]

    the LocalDateTime array read

  • Reads a timestamp with timezone.

    Parameters

    • fieldName: string

      name of the field

    Returns OffsetDateTime

    the OffsetDateTime value read

  • Reads an array of OffsetDateTimes.

    see

    readTimestampWithTimezone

    Parameters

    • fieldName: string

      name of the field

    Returns OffsetDateTime[]

    the OffsetDateTime array read

  • readUTF(fieldName: string): string
  • Reads a string from UTF-8 encoded bytes.

    deprecated

    since version 4.2 for the sake of better naming. Please use readString instead.

    Parameters

    • fieldName: string

      name of the field

    Returns string

    the UTF string value read

  • readUTFArray(fieldName: string): string[]
  • Reads an array strings. Strings are read using UTF-8 encoding.

    deprecated

    since version 4.2 for the sake of better naming. Please use readStringArray instead

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

    the string array value read

Generated using TypeDoc