C# Class DevelPlatform.SpecialTypes.MemoryTributary

MemoryTributary is a re-implementation of MemoryStream that uses a dynamic list of byte arrays as a backing store, instead of a single byte array, the allocation of which will fail for relatively small streams as it requires contiguous memory.
Inheritance: Stream
Afficher le fichier Open project: YPermitin/V8Formats

Protected Properties

Свойство Type Description
blockSize long
blocks List
length long

Méthodes publiques

Méthode Description
Flush ( ) : void
MemoryTributary ( ) : System
MemoryTributary ( byte source ) : System
MemoryTributary ( int length ) : System
Read ( byte buffer, int offset, int count ) : int
ReadByte ( ) : int
ReadFrom ( Stream source, long length ) : void

Reads length bytes from source into the this instance at the current position.

Seek ( long offset, SeekOrigin origin ) : long
SetLength ( long value ) : void
ToArray ( ) : byte[]

Returns the entire content of the stream as a byte array. This is not safe because the call to new byte[] may fail if the stream is large enough. Where possible use methods which operate on streams directly instead.

Write ( byte buffer, int offset, int count ) : void
WriteByte ( byte value ) : void
WriteTo ( Stream destination ) : void

Writes the entire stream into destination, regardless of Position, which remains unchanged.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void
EnsureCapacity ( long intended_length ) : void

Method Details

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

EnsureCapacity() protected méthode

protected EnsureCapacity ( long intended_length ) : void
intended_length long
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

MemoryTributary() public méthode

public MemoryTributary ( ) : System
Résultat System

MemoryTributary() public méthode

public MemoryTributary ( byte source ) : System
source byte
Résultat System

MemoryTributary() public méthode

public MemoryTributary ( int length ) : System
length int
Résultat System

Read() public méthode

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Résultat int

ReadByte() public méthode

public ReadByte ( ) : int
Résultat int

ReadFrom() public méthode

Reads length bytes from source into the this instance at the current position.
public ReadFrom ( Stream source, long length ) : void
source Stream The stream containing the data to copy
length long The number of bytes to copy
Résultat void

Seek() public méthode

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Résultat long

SetLength() public méthode

public SetLength ( long value ) : void
value long
Résultat void

ToArray() public méthode

Returns the entire content of the stream as a byte array. This is not safe because the call to new byte[] may fail if the stream is large enough. Where possible use methods which operate on streams directly instead.
public ToArray ( ) : byte[]
Résultat byte[]

Write() public méthode

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Résultat void

WriteByte() public méthode

public WriteByte ( byte value ) : void
value byte
Résultat void

WriteTo() public méthode

Writes the entire stream into destination, regardless of Position, which remains unchanged.
public WriteTo ( Stream destination ) : void
destination Stream The stream to write the content of this stream to
Résultat void

Property Details

blockSize protected_oe property

protected long blockSize
Résultat long

blocks protected_oe property

protected List blocks
Résultat List

length protected_oe property

protected long length
Résultat long