Action
    Preparing search index...

    Class Encoding

    Represents a character encoding.

    Hierarchy (View Summary)

    Index

    Accessors

    • get ASCII(): Encoding

      Gets an encoding for the ASCII (7-bit) character set.

      Returns Encoding

      An encoding for the ASCII (7-bit) character set.

    • get BigEndianUnicode(): Encoding

      Gets an encoding for the UTF-16 format that uses the big endian byte order.

      Returns Encoding

      An encoding object for the UTF-16 format that uses the big endian byte order.

    • get UTF32(): Encoding

      Gets an encoding for the UTF-32 format using the little endian byte order.

      Returns Encoding

      An encoding object for the UTF-32 format using the little endian byte order.

    • get UTF8(): Encoding

      Gets an encoding for the UTF-8 format.

      Returns Encoding

      An encoding for the UTF-8 format.

    Methods

    • Casts this object to the specified type. Throws error on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1

    • Determines whether the specified object is equal to the current object.

      Parameters

      • obj: any

        The object to compare with the current object.

      Returns boolean

      true if the specified object is equal to the current object; otherwise, false.

    • Serves as the default hash function.

      Returns number

      A hash code for the current object.

    • When overridden in a derived class, decodes a sequence of bytes from the specified byte array into a string.

      Parameters

      • bytes: TypedArray<number> | TypedArray<Byte>

        The byte array containing the sequence of bytes to decode.

      • index: number | Int32

        The index of the first byte to decode.

      • count: number | Int32

        The number of bytes to decode.

      Returns string

      A string that contains the results of decoding the specified sequence of bytes.

    • Returns a string that represents the current object.

      Returns string

      A string that represents the current object.

    • Casts this object to the specified type. Returns null on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns null | T1

    • Determines whether the specified object instances are considered equal.

      Parameters

      • objA: any

        The first object to compare.

      • objB: any

        The second object to compare.

      Returns boolean

      true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.