Provides a generic view of a sequence of bytes. This is an abstract class.

Hierarchy (view full)

Accessors

  • get Length(): number
  • When overridden in a derived class, gets the length in bytes of the stream.

    Returns number

    A long value representing the length of the stream in bytes.

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, sets the position within the current stream.

    Parameters

    • offset: number | Int64

      A byte offset relative to the origin parameter.

    • origin: SeekOrigin

      A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.

    Returns number

    The new position within the current stream.

  • 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.