Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Class

StreamReader

class StreamReader

Module: System.IO
Assembly: System.Runtime.dll
Source file: StreamReader.rvn

Inheritance: Object → StreamReader
Implements: TextReader

Asynchronous buffered text input with explicit stream ownership.

Properties

1 item
NewLine: string Exact nonempty line delimiter, removed from ReadLine results. Defaults to LF. Implements TextReader.NewLine

Methods

13 items
Close() -> () Closes the reader idempotently. Implements TextReader.Close
Static member: Create(input: InputStream, encoding: Encoding, leaveOpen?: bool) -> Result<StreamReader, TextReadError> Creates a wrapper with the supplied encoding and ownership policy.
Static member: Create(input: InputStream, leaveOpen?: bool) -> Result<StreamReader, TextReadError> Creates a UTF-8 wrapper with explicit ownership of the underlying stream.
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
PeekChar() -> Task<Result<Optional<Character>, TextReadError>> Peeks at the next Unicode grapheme without advancing the text cursor. Implements TextReader.PeekChar
Read(count: int, maxUtf8Bytes: int) -> Task<Result<string, TextReadError>> Reads a requested number of graphemes with a separate UTF-8 byte bound. Implements TextReader.Read
Read(count: int) -> Task<Result<string, TextReadError>> Reads a requested number of graphemes with a separate UTF-8 byte bound. Implements TextReader.Read
ReadChar() -> Task<Result<Optional<Character>, TextReadError>> Reads one Unicode grapheme and advances the shared text cursor. Implements TextReader.ReadChar
ReadLine(maxUtf8Bytes: int) -> Task<Result<Optional<string>, TextReadError>> Returns a Task; await completion. Reads a decoded line without its LF or CRLF terminator. Implements TextReader.ReadLine
ReadToEnd(maxUtf8Bytes: int) -> Task<Result<string, TextReadError>> Returns a Task; await completion. Reads remaining text subject to a UTF-8 output-byte bound. Implements TextReader.ReadToEnd
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString