C# Класс 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.
Наследование: Stream
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
blockSize long
blocks List
length long

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void
EnsureCapacity ( long intended_length ) : void

Описание методов

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

EnsureCapacity() защищенный Метод

protected EnsureCapacity ( long intended_length ) : void
intended_length long
Результат void

Flush() публичный Метод

public Flush ( ) : void
Результат void

MemoryTributary() публичный Метод

public MemoryTributary ( ) : System
Результат System

MemoryTributary() публичный Метод

public MemoryTributary ( byte source ) : System
source byte
Результат System

MemoryTributary() публичный Метод

public MemoryTributary ( int length ) : System
length int
Результат System

Read() публичный Метод

public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int

ReadByte() публичный Метод

public ReadByte ( ) : int
Результат int

ReadFrom() публичный Метод

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
Результат void

Seek() публичный Метод

public Seek ( long offset, SeekOrigin origin ) : long
offset long
origin SeekOrigin
Результат long

SetLength() публичный Метод

public SetLength ( long value ) : void
value long
Результат void

ToArray() публичный Метод

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[]
Результат byte[]

Write() публичный Метод

public Write ( byte buffer, int offset, int count ) : void
buffer byte
offset int
count int
Результат void

WriteByte() публичный Метод

public WriteByte ( byte value ) : void
value byte
Результат void

WriteTo() публичный Метод

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
Результат void

Описание свойств

blockSize защищенное свойство

protected long blockSize
Результат long

blocks защищенное свойство

protected List blocks
Результат List

length защищенное свойство

protected long length
Результат long