mimekit-ts - v1.0.0
    Preparing search index...

    Class StreamAbstract

    Hierarchy (View Summary)

    Index
    • get canRead(): boolean

      Whether the stream supports reading.

      Returns boolean

    • get canWrite(): boolean

      Whether the stream supports writing.

      Returns boolean

    • get canSeek(): boolean

      Whether the stream supports seeking.

      Returns boolean

    • get length(): number

      The length of the stream, in bytes.

      Returns number

    • get position(): number

      The current position within the stream.

      Returns number

    • set position(value: number): void

      Set the current position within the stream.

      Parameters

      • value: number

      Returns void

    • Validate buffer, offset, and count arguments for stream read/write operations.

      Parameters

      • buffer: Uint8Array

        The buffer supplied by the caller.

      • offset: number

        The starting offset in the buffer.

      • count: number

        The number of bytes to read or write.

      Returns void

      offset or count does not specify a valid range in buffer.

    • Read up to count bytes into buffer at offset; returns bytes read (0 only at end of stream).

      Parameters

      • buffer: Uint8Array
      • offset: number
      • count: number

      Returns number

    • Write count bytes from buffer starting at offset.

      Parameters

      • buffer: Uint8Array
      • offset: number
      • count: number

      Returns void

    • Set the position within the stream.

      Parameters

      • offset: number

        The offset relative to origin.

      • origin: SeekOrigin

        The reference point used to obtain the new position.

      Returns number

      The new position within the stream.

    • Set the length of the stream.

      Parameters

      • value: number

        The desired length in bytes.

      Returns void

    • Copy data from this stream to another stream.

      Parameters

      • destination: Stream

        The stream that will receive the copied data.

      • bufferSize: number = 4096

        The temporary buffer size to use while copying.

      Returns void

    • Release resources. Base implementation does nothing.

      Returns void

    • Throw for an unsupported stream operation.

      Parameters

      • operation: string

        The unsupported operation name.

      Returns never

      Always thrown because the operation is unsupported.