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.
- Tipo
- class
- Espacio de nombres
- System.IO
- Ensamblado
- System.Core
- Acceso
- public, abstract
- Archivo fuente
Stream.ant
Herencia
- Clases base
-
AnyStream - Tipos derivados
-
BufferedStreamFileStreamHandleStreamMemoryStream
Propiedades
How many bytes it has (streams that can seek).
Where the next byte is read or written (streams that can seek).
Métodos
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
#
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
Stream en Larva HIR, descompilado a partir de su 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
}