C# 클래스 Journaler.ByteRingBuffer

A circular ring buffer of bytes
파일 보기 프로젝트 열기: odeheurles/Journaler-net 1 사용 예제들

공개 메소드들

메소드 설명
AsArray ( ) : byte[]

Access the underlying byte array

ByteRingBuffer ( int size ) : System

Create a ByteRingBuffer with a given size

WriteByte ( byte value ) : bool

Write a single byte to the buffer. If this is the last byte written to the buffer the BufferFull event will be raised

WriteBytes ( ArraySegment input ) : bool

Write an array of bytes to the buffer

WriteInt ( int value ) : bool

Write an int to the buffer. If the buffer becomes full during the write the BufferFull will be raised and then the remaining bytes will be written at the begining of the buffer.

WriteLong ( long value ) : bool

Write a long to the buffer If the buffer becomes full during the write the BufferFull will be raised and then the remaining bytes will be written at the begining of the buffer.

this ( int index ) : byte

Read the byte at the given index

메소드 상세

AsArray() 공개 메소드

Access the underlying byte array
public AsArray ( ) : byte[]
리턴 byte[]

ByteRingBuffer() 공개 메소드

Create a ByteRingBuffer with a given size
public ByteRingBuffer ( int size ) : System
size int number of bytes the buffer will contain
리턴 System

WriteByte() 공개 메소드

Write a single byte to the buffer. If this is the last byte written to the buffer the BufferFull event will be raised
public WriteByte ( byte value ) : bool
value byte the value to write to the buffer
리턴 bool

WriteBytes() 공개 메소드

Write an array of bytes to the buffer
public WriteBytes ( ArraySegment input ) : bool
input ArraySegment The array of byte to write from
리턴 bool

WriteInt() 공개 메소드

Write an int to the buffer. If the buffer becomes full during the write the BufferFull will be raised and then the remaining bytes will be written at the begining of the buffer.
public WriteInt ( int value ) : bool
value int the value to write to the buffer
리턴 bool

WriteLong() 공개 메소드

Write a long to the buffer If the buffer becomes full during the write the BufferFull will be raised and then the remaining bytes will be written at the begining of the buffer.
public WriteLong ( long value ) : bool
value long the value to write to the buffer
리턴 bool

this() 공개 메소드

Read the byte at the given index
public this ( int index ) : byte
index int index within the buffer
리턴 byte