C# Класс CSMongo.IO.DynamicStream

Works with bytes that could be modified in different locations at any given time
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Append ( byte @byte ) : void

Appends the byte to the end of the stream

DynamicStream ( ) : System.Collections.Generic

Creates an empty DynamicStream

DynamicStream ( int length ) : System.Collections.Generic

Creates a stream with the provided length with all 0 bytes

DynamicStream ( int length, byte @default ) : System.Collections.Generic

Creates a stream with the provided length defaulting to the byte specified

InsertAt ( int index, byte bytes ) : void

Inserts a new byte at the specified index

Read ( int start, int length ) : byte[]

Reads the bytes within the specified area

ToArray ( ) : byte[]

Returns all of the bytes for the stream as an array

WriteAt ( int index, byte @byte ) : void

Overwrites the byte at the specified index

Приватные методы

Метод Описание
_Reset ( ) : void

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

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

Appends the byte to the end of the stream
public Append ( byte @byte ) : void
@byte byte
Результат void

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

Creates an empty DynamicStream
public DynamicStream ( ) : System.Collections.Generic
Результат System.Collections.Generic

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

Creates a stream with the provided length with all 0 bytes
public DynamicStream ( int length ) : System.Collections.Generic
length int
Результат System.Collections.Generic

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

Creates a stream with the provided length defaulting to the byte specified
public DynamicStream ( int length, byte @default ) : System.Collections.Generic
length int
@default byte
Результат System.Collections.Generic

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

Inserts a new byte at the specified index
public InsertAt ( int index, byte bytes ) : void
index int
bytes byte
Результат void

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

Reads the bytes within the specified area
public Read ( int start, int length ) : byte[]
start int
length int
Результат byte[]

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

Returns all of the bytes for the stream as an array
public ToArray ( ) : byte[]
Результат byte[]

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

Overwrites the byte at the specified index
public WriteAt ( int index, byte @byte ) : void
index int
@byte byte
Результат void