Action
    Preparing search index...

    Class MemoryStream

    Creates a stream whose backing store is memory.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get CanRead(): boolean

      Gets a value indicating whether the current stream supports reading.

      Returns boolean

      true if the stream is open.

    • get CanSeek(): boolean

      Gets a value indicating whether the current stream supports seeking.

      Returns boolean

      true if the stream is open.

    • get CanWrite(): boolean

      Gets a value indicating whether the current stream supports writing.

      Returns boolean

      true if the stream supports writing; otherwise, false.

    • get Length(): number

      Gets the length of the stream in bytes.

      Returns number

      The length of the stream in bytes.

    • get Position(): number

      Gets or sets the current position within the stream.

      Returns number

      The current position within the stream.

    • set Position(value: number): void

      When overridden in a derived class, gets or sets the position within the current stream.

      Parameters

      • value: number

      Returns void

      The current position within the stream.

    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.