class · System.IO
MemoryStream
public class System.IO.MemoryStream : System.IO.Stream
Bytes kept in an array that grows as it is written (or in a fixed array given to it).
- Tipo
- class
- Espacio de nombres
- System.IO
- Ensamblado
- System.Core
- Acceso
- public
- Archivo fuente
Stream.ant
Herencia
Constructores
Propiedades
How many bytes fit before it grows.
Métodos
method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
#
method Close() -> void
#
A copy of its bytes.
The array it keeps its bytes in (Length of them are the stream's).
method WriteTo(destination: System.IO.Stream) -> void
#
Writes all its bytes into destination.
Miembros privados e internos (13)
Miembros heredados (12)
Código fuente
MemoryStream en Larva HIR, descompilado a partir de su Larva HIR.
// Bytes kept in an array that grows as it is written (or in a fixed array given to it).
public class System.IO.MemoryStream : System.IO.Stream
{
field data: u8[]
field length: i32
field position: i32
field writable: bool
field growable: bool
field open: bool
// Where a write can go without the slow path: data.Length when open and writable, else 0.
field room: i32
// The throw is kept out of the methods that check (so they stay small enough to inline).
static method Closed() -> void
static method ReadOnly() -> void
method Check() -> void
// Room for at least `needed` bytes.
method Reserve(needed: i32) -> void
method Grow(needed: i32) -> void
method WriteByteSlow(value: u8) -> void
constructor MemoryStream()
constructor MemoryStream(capacity: i32)
// Over `buffer` (its bytes are the stream's, it does not grow).
constructor MemoryStream(buffer: u8[])
constructor MemoryStream(buffer: u8[], writable: bool)
method Read(buffer: u8[], offset: i32, count: i32) -> i32
method ReadByte() -> i32
method Write(buffer: u8[], offset: i32, count: i32) -> void
method WriteByte(value: u8) -> void
method Seek(offset: i64, origin: System.IO.SeekOrigin) -> i64
method SetLength(newLength: i64) -> void
method Close() -> void
// A copy of its bytes.
method ToArray() -> u8[]
// The array it keeps its bytes in (Length of them are the stream's).
method GetBuffer() -> u8[]
// Writes all its bytes into `destination`.
method WriteTo(destination: System.IO.Stream) -> void
property CanRead: bool
property CanWrite: bool
property CanSeek: bool
property Length: i64
property Position: i64
// How many bytes fit before it grows.
property Capacity: i32
}