class · System.IO

StreamReader

public class System.IO.StreamReader : System.IO.TextReader

Text read from a stream as UTF-8 (a byte order mark at the start is skipped), through a buffer.

Kind
class
Namespace
System.IO
Assembly
System.Core
Access
public
Source file
TextIO.ant

Inheritance

Base classes
Any TextReader StreamReader

Constructors

constructor StreamReader(stream: System.IO.Stream)
#
constructor StreamReader(stream: System.IO.Stream, bufferSize: i32)
#
constructor StreamReader(path: System.String<u8>)
#

Properties

property BaseStream: System.IO.Stream
#

read-only

The stream it reads from.

property EndOfStream: bool
#

read-only

Whether everything has been read.

Methods

method Peek() -> i32
#

override

method Read() -> i32
#

override

method ReadLine() -> System.String<u8>?
#

override

method ReadToEnd() -> System.String<u8>
#

override

method Close() -> void
#

override

Private and internal members (10)

field stream: System.IO.Stream
#

private

field buffer: u8[]
#

private

field at: i32
#

private

field end: i32
#

private

field started: bool
#

private

field pending: u8[]
#

private

A line that does not fit in what is buffered gathers here.

field pendingLength: i32
#

private

method Fill() -> bool
#

private

Whether there are bytes to read (reading more when the buffer is used up).

method Keep(from: i32, count: i32) -> void
#

private

method Decode(take: bool) -> i32
#

private

The code point starting at the next byte, taken when take.

Inherited members (5)

Source

StreamReader as Larva HIR, decompiled from its Larva HIR.

System.IO.StreamReader.hir
// Text read from a stream as UTF-8 (a byte order mark at the start is skipped), through a buffer.
public class System.IO.StreamReader : System.IO.TextReader
{
    field stream: System.IO.Stream
    field buffer: u8[]
    field at: i32
    field end: i32
    field started: bool
    // A line that does not fit in what is buffered gathers here.
    field pending: u8[]
    field pendingLength: i32
    // Whether there are bytes to read (reading more when the buffer is used up).
    method Fill() -> bool
    method Keep(from: i32, count: i32) -> void
    // The code point starting at the next byte, taken when `take`.
    method Decode(take: bool) -> i32
    constructor StreamReader(stream: System.IO.Stream)
    constructor StreamReader(stream: System.IO.Stream, bufferSize: i32)
    constructor StreamReader(path: System.String<u8>)
    method Peek() -> i32
    method Read() -> i32
    method ReadLine() -> System.String<u8>?
    method ReadToEnd() -> System.String<u8>
    method Close() -> void
    // The stream it reads from.
    property BaseStream: System.IO.Stream
    // Whether everything has been read.
    property EndOfStream: bool
}
Esc