class · System.IO

BinaryReader

public class System.IO.BinaryReader : System.Any
Kind
class
Namespace
System.IO
Assembly
System.Core
Access
public
Source file
BinaryIO.ant

Inheritance

Base classes
Any BinaryReader

Constructors

constructor BinaryReader(input: System.IO.Stream)
#

Properties

property BaseStream: System.IO.Stream
#

read-only

The stream it reads from.

Methods

method ReadByte() -> u8
#
method ReadSByte() -> i8
#
method ReadBoolean() -> bool
#
method ReadInt16() -> i16
#
method ReadUInt16() -> u16
#
method ReadInt32() -> i32
#
method ReadUInt32() -> u32
#
method ReadInt64() -> i64
#
method ReadUInt64() -> u64
#
method ReadFloat32() -> f32
#
method ReadFloat64() -> f64
#
method ReadString() -> System.String<u8>
#

What Write(str) wrote: a 7-bit encoded byte count and UTF-8 bytes.

method ReadBytes(count: i32) -> u8[]
#

Up to count bytes (fewer only at the end of the stream).

method Read7BitEncodedInt() -> i32
#
method Close() -> void
#

Private and internal members (5)

field stream: System.IO.Stream
#

private

field memory: System.IO.MemoryStream?
#

private

The stream when it is a MemoryStream (see BinaryWriter).

field scratch: u8[]
#

private

method Rest(got: i32, count: i32) -> void
#

private

The rest of a value the stream gave only in part (the rare path, kept out of Take so Take inlines).

method Take(count: i32) -> u64
#

private

Inherited members (5)

Source

BinaryReader as Larva HIR, decompiled from its Larva HIR.

System.IO.BinaryReader.hir
public class System.IO.BinaryReader : System.Any
{
    field stream: System.IO.Stream
    // The stream when it is a MemoryStream (see BinaryWriter).
    field memory: System.IO.MemoryStream?
    field scratch: u8[]
    // The rest of a value the stream gave only in part (the rare path, kept out of Take so Take inlines).
    method Rest(got: i32, count: i32) -> void
    method Take(count: i32) -> u64
    constructor BinaryReader(input: System.IO.Stream)
    method ReadByte() -> u8
    method ReadSByte() -> i8
    method ReadBoolean() -> bool
    method ReadInt16() -> i16
    method ReadUInt16() -> u16
    method ReadInt32() -> i32
    method ReadUInt32() -> u32
    method ReadInt64() -> i64
    method ReadUInt64() -> u64
    method ReadFloat32() -> f32
    method ReadFloat64() -> f64
    // What Write(str) wrote: a 7-bit encoded byte count and UTF-8 bytes.
    method ReadString() -> System.String<u8>
    // Up to `count` bytes (fewer only at the end of the stream).
    method ReadBytes(count: i32) -> u8[]
    method Read7BitEncodedInt() -> i32
    method Close() -> void
    // The stream it reads from.
    property BaseStream: System.IO.Stream
}
Esc