C# Класс ICSharpCode.SharpZipLib.Tests.TestSupport.ReadWriteRingBuffer

A fixed size buffer of bytes. Both reading and writing are supported. Reading from an empty buffer will wait until data is written. Writing to a full buffer will wait until data is read.
Показать файл Открыть проект Примеры использования класса

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

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

Clear the buffer contents.

Close ( ) : void

Close the buffer for writing.

A Read when the buffer is closed and there is no data will return -1.

Read ( byte buffer, int index, int count ) : int
ReadByte ( ) : int

Read a byte from the buffer.

ReadWriteRingBuffer ( int size ) : System

Create a new RingBuffer with a specified size.

Write ( byte buffer, int index, int count ) : void
WriteByte ( byte value ) : void

Write adds a byte to the head of the RingBuffer.

this ( int index ) : byte

Indexer - Get an element from the tail of the RingBuffer.

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

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

Clear the buffer contents.
public Clear ( ) : void
Результат void

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

Close the buffer for writing.
A Read when the buffer is closed and there is no data will return -1.
public Close ( ) : void
Результат void

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

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

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

Read a byte from the buffer.
public ReadByte ( ) : int
Результат int

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

Create a new RingBuffer with a specified size.
public ReadWriteRingBuffer ( int size ) : System
size int The size of the ring buffer to create.
Результат System

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

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

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

Write adds a byte to the head of the RingBuffer.
public WriteByte ( byte value ) : void
value byte The value to add.
Результат void

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

Indexer - Get an element from the tail of the RingBuffer.
public this ( int index ) : byte
index int
Результат byte