API reference
Preparing search index…

Read-only Rml::StreamFile using the installed RmlUi file interface.

Close before shutdown is automatic. After close, read/seek/tell require reopening. Memory modification operations always throw.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory21

Constructors

Methods

Constructors

Methods

  • Invoke Rml::Stream::Close; memory bytes remain available until shutdown.

    Returns

    void
    Source & inheritance
  • Return Rml::Stream::GetSourceURL as text.

    Returns

    string

    Source URL used for relative resources.

    Source & inheritance
  • Return Rml::Stream::GetStreamMode; new memory streams start at zero.

    Returns

    number

    Native mode bit mask.

    Source & inheritance
  • Invoke Rml::Stream::IsEOS.

    Returns

    boolean

    Whether the cursor is at the end.

    Source & inheritance
  • Invoke Rml::Stream::IsReadReady.

    Returns

    boolean

    Whether bytes are ready to read.

    Source & inheritance
  • Check readiness; immutable memory snapshots and files always return false.

    Returns

    boolean

    Whether bytes can be written now.

    Source & inheritance
  • Return Rml::Stream::Length in bytes.

    Returns

    number

    Total byte length.

    Source & inheritance
  • Open a file, first releasing any previous native file handle.

    Parameters

    path
    string

    File-interface path; embedded nulls are rejected.

    Returns

    boolean

    Native open result.

    Source & inheritance
  • Read through Rml::Stream::Peek without advancing the cursor.

    Parameters

    target
    number

    Maximum byte count.

    Returns

    Uint8Array

    Independent bytes without consuming the source.

    Source & inheritance
  • Peek into a view without advancing the cursor.

    Parameters

    target
    Uint8Array

    Destination byte view.

    countOptional
    number

    Byte limit; defaults to view size.

    Returns

    number

    Bytes copied without consuming the source.

    Source & inheritance
  • Invoke safe Rml::Stream::PopBack with a length-clamped count.

    Parameters

    count
    number

    Maximum bytes to remove.

    Returns

    number

    Actual bytes removed.

    Source & inheritance
  • Remove front bytes; oversized counts clamp to the stream length.

    Parameters

    count
    number

    Maximum bytes to remove.

    Returns

    number

    Actual bytes removed; memory cursors move back and clamp at zero.

    Source & inheritance
  • Invoke Rml::Stream::PushBack and restore the previous cursor.

    Parameters

    input
    string | Uint8Array

    UTF-8 text or bytes to append.

    Returns

    number

    Number of bytes appended.

    Source & inheritance
  • Invoke Rml::Stream::PushFront; memory cursors advance with the insertion.

    Parameters

    input
    string | Uint8Array

    UTF-8 text or bytes to prepend.

    Returns

    number

    Number of bytes prepended.

    Source & inheritance
  • Read bytes through Rml::Stream::Read.

    Parameters

    target
    number

    Maximum byte count.

    Returns

    Uint8Array

    Independent bytes consumed from the current cursor.

    Stream copying preserves native counts even if the destination writes fewer bytes. Copying a stream to itself is rejected.

    Source & inheritance
  • Read into a view or stream through Rml::Stream::Read.

    Parameters

    target
    Uint8Array | Stream

    Destination view or stream.

    countOptional
    number

    Byte limit; defaults to view size or remaining length.

    Returns

    number

    Source bytes consumed, even on short destination writes.

    Source & inheritance
  • Decode consumed UTF-8 bytes and append them to an initial string.

    Parameters

    count
    number

    Maximum byte count.

    initial
    string = ''

    Initial string; defaults to empty.

    Returns

    string

    Appended string, preserving embedded null characters.

    Source & inheritance
  • Invoke Rml::Stream::Seek with a checked signed integer offset.

    Parameters

    offset
    number

    Byte offset; StreamMemory End subtracts this value.

    origin
    SeekOrigin = SeekOrigin.Set

    Seek base; defaults to Set.

    Returns

    boolean

    Native success flag; invalid memory targets leave the cursor.

    Source & inheritance
  • Return Rml::Stream::Tell in bytes.

    Returns

    number

    Current byte position.

    Source & inheritance
  • Invoke Rml::Stream::Truncate; memory cursors move to the new end.

    Parameters

    length
    number

    Requested byte length; larger memory lengths do nothing.

    Returns

    number

    Number of bytes removed.

    Source & inheritance
  • Invoke Rml::Stream::Write using UTF-8, bytes or another stream.

    Parameters

    input
    string | Uint8Array | Stream

    Source; strings preserve embedded null characters.

    countOptional
    number

    Optional byte limit; defaults to input or remaining size.

    Returns

    number

    Bytes written, or source bytes consumed when copying a stream.

    Source & inheritance
  • Invoke the native C-string write semantics, stopping at the first null.

    Parameters

    input
    string

    UTF-8 text.

    Returns

    number

    Bytes written before the first null.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0