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.
파일 보기 프로젝트 열기: icsharpcode/SharpZipLib 1 사용 예제들

공개 메소드들

메소드 설명
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