Reader helper for Portable objects.

Hierarchy

  • PortableReader

Methods

  • Returns

    true if field exist in this class.

    Parameters

    • fieldName: string

      name of the field (does not support nested paths)

    Returns boolean

  • Reads a primitive boolean.

    Returns

    the boolean value read

    Parameters

    • fieldName: string

      name of the field

    Returns boolean

  • Reads an array of primitive booleans.

    Returns

    the boolean array value read

    Parameters

    • fieldName: string

      name of the field

    Returns boolean[]

  • Reads a 8-bit unsigned integer.

    Returns

    the byte value read

    Parameters

    • fieldName: string

      name of the field

    Returns number

  • Reads an array of bytes.

    Returns

    the byte array value read

    Parameters

    • fieldName: string

      name of the field

    Returns Buffer

  • Reads a single character string using String.fromCharCode from two bytes of UTF-16 code units.

    Returns

    the char value read

    Parameters

    • fieldName: string

      name of the field

    Returns string

  • Reads an array of single character strings. Each of them are read using String.fromCharCode from a two bytes UTF-16 code units.

    Returns

    the char array value read

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

  • Reads a double.

    Returns

    the double value read

    Parameters

    • fieldName: string

      name of the field

    Returns number

  • Reads an array of doubles.

    Returns

    the double array value read

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

  • Reads a float.

    Returns

    the float value read

    Parameters

    • fieldName: string

      name of the field

    Returns number

  • Reads an array of floats.

    Returns

    the float array value read

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

  • Reads a 32-bit signed integer.

    Returns

    the int value read

    Parameters

    • fieldName: string

      name of the field

    Returns number

  • Reads an array of 32-bit signed integers.

    Returns

    the int array value read

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

  • Reads a long.

    Returns

    the long value read

    Parameters

    • fieldName: string

      name of the field

    Returns Long

  • Reads an array of longs.

    Returns

    the long array value read

    Parameters

    • fieldName: string

      name of the field

    Returns Long[]

  • Reads a 16-bit signed integer.

    Returns

    the short value read

    Parameters

    • fieldName: string

      name of the field

    Returns number

  • Reads an array of 16-bit signed integers.

    Returns

    the short array value read

    Parameters

    • fieldName: string

      name of the field

    Returns number[]

  • Reads a string from UTF-8 encoded bytes.

    Returns

    the string value read

    Parameters

    • fieldName: string

      name of the field

    Returns string

  • Reads an array of strings. Strings are read using UTF-8 encoding.

    Returns

    the string array value read

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

  • Reads a string from UTF-8 encoded bytes.

    Returns

    the UTF string value read

    Deprecated

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

    Parameters

    • fieldName: string

      name of the field

    Returns string

  • Reads an array strings. Strings are read using UTF-8 encoding.

    Returns

    the string array value read

    Deprecated

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

    Parameters

    • fieldName: string

      name of the field

    Returns string[]

Generated using TypeDoc