class · System.IO
Stream
public class System.IO.Stream : System.Any
A sequence of bytes. A stream says what it can do (CanRead, CanWrite, CanSeek); what it cannot do throws IOError.
- Kind
- class
- Namespace
- System.IO
- Assembly
- System.Core
- Access
- public, abstract
- Source file
Stream.ant
Inheritance
- Base classes
-
AnyStream - Derived types
-
BufferedStreamFileStreamHandleStreamMemoryStream
Properties
How many bytes it has (streams that can seek).
Where the next byte is read or written (streams that can seek).
Methods
Reads up to count bytes into buffer[offset..]: how many (0 only at the end).
Writes buffer[offset..offset + count].
method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
#
Moves to offset from origin: the new position.
Makes it length bytes long (cutting or adding zeros).
method Flush() -> void
#
Sends what is buffered to where the stream ends up.
method Close() -> void
#
Flushes and lets go of what the stream holds; using it afterwards throws.
The next byte (0–255), or -1 at the end.
Reads up to buffer.Length bytes: how many (0 only at the end).
Reads exactly count bytes into buffer[offset..] (EndOfStreamError if the stream ends first).
Everything from the position to the end.
method CopyTo(destination: System.IO.Stream) -> void
#
Copies everything from the position to the end into destination.
method CopyTo(destination: System.IO.Stream, bufferSize: i32) -> void
#
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
Stream as Larva HIR, decompiled from its Larva HIR.
// A sequence of bytes. A stream says what it can do (CanRead, CanWrite, CanSeek); what it cannot do throws IOError.
public class System.IO.Stream : System.Any
{
// Reads up to `count` bytes into buffer[offset..]: how many (0 only at the end).
method Read(buffer: u8[], offset: i32, count: i32) -> i32
// Writes buffer[offset..offset + count].
method Write(buffer: u8[], offset: i32, count: i32) -> void
// Moves to `offset` from `origin`: the new position.
method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
// Makes it `length` bytes long (cutting or adding zeros).
method SetLength(length: i64) -> void
// Sends what is buffered to where the stream ends up.
method Flush() -> void
// Flushes and lets go of what the stream holds; using it afterwards throws.
method Close() -> void
// The next byte (0–255), or -1 at the end.
method ReadByte() -> i32
method WriteByte(value: u8) -> void
// Reads up to buffer.Length bytes: how many (0 only at the end).
method Read(buffer: u8[]) -> i32
method Write(buffer: u8[]) -> void
// Reads exactly `count` bytes into buffer[offset..] (EndOfStreamError if the stream ends first).
method ReadExactly(buffer: u8[], offset: i32, count: i32) -> void
// Everything from the position to the end.
method ReadToEnd() -> u8[]
// Copies everything from the position to the end into `destination`.
method CopyTo(destination: System.IO.Stream) -> void
method CopyTo(destination: System.IO.Stream, bufferSize: i32) -> void
property CanRead: bool
property CanWrite: bool
property CanSeek: bool
// How many bytes it has (streams that can seek).
property Length: i64
// Where the next byte is read or written (streams that can seek).
property Position: i64
}