C# 클래스 Amqp.ByteBuffer

A byte array wrapper that has read and write cursors.
파일 보기 프로젝트 열기: xamarin/mini-hacks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddReference void
ByteBuffer System
DuplicateBuffer void
ReleaseReference void
ToArraySegment ArraySegment

공개 메소드들

메소드 설명
AdjustPosition ( int offset, int length ) : void

Adjusts the read and write position.

Append ( int size ) : void

Advances the write position. As a result, length is increased by size.

ByteBuffer ( byte buffer, int offset, int count, int capacity ) : System

Initializes a new buffer from a byte array.

ByteBuffer ( int size, bool autoGrow ) : System

Initializes a new buffer of a specified size.

Complete ( int size ) : void

Advances the read position.

Reset ( ) : void

Resets read and write position to the initial state.

Seek ( int seekPosition ) : void

Sets the read position.

Shrink ( int size ) : void

Moves back the write position. As a result, length is decreased by size.

Validate ( bool write, int dataSize ) : void

Verifies that if the buffer has enough bytes for read or enough room for write and grow the buffer if needed.

비공개 메소드들

메소드 설명
AddReference ( ) : void
ByteBuffer ( byte buffer, int offset, int count, int capacity, bool autoGrow ) : System
DuplicateBuffer ( int bufferSize, int dataSize, byte &buffer, int &offset, int &count ) : void
ReleaseReference ( ) : void
ToArraySegment ( ) : ArraySegment

메소드 상세

AdjustPosition() 공개 메소드

Adjusts the read and write position.
public AdjustPosition ( int offset, int length ) : void
offset int Read position to set.
length int Length from read position to set the write position.
리턴 void

Append() 공개 메소드

Advances the write position. As a result, length is increased by size.
public Append ( int size ) : void
size int Size to advance.
리턴 void

ByteBuffer() 공개 메소드

Initializes a new buffer from a byte array.
public ByteBuffer ( byte buffer, int offset, int count, int capacity ) : System
buffer byte The byte array.
offset int The start position.
count int The number of bytes.
capacity int The total size of the byte array from offset.
리턴 System

ByteBuffer() 공개 메소드

Initializes a new buffer of a specified size.
public ByteBuffer ( int size, bool autoGrow ) : System
size int The size in bytes.
autoGrow bool If the buffer should auto-grow when a write size is larger than the buffer size.
리턴 System

Complete() 공개 메소드

Advances the read position.
public Complete ( int size ) : void
size int Size to advance.
리턴 void

Reset() 공개 메소드

Resets read and write position to the initial state.
public Reset ( ) : void
리턴 void

Seek() 공개 메소드

Sets the read position.
public Seek ( int seekPosition ) : void
seekPosition int Position to set.
리턴 void

Shrink() 공개 메소드

Moves back the write position. As a result, length is decreased by size.
public Shrink ( int size ) : void
size int
리턴 void

Validate() 공개 메소드

Verifies that if the buffer has enough bytes for read or enough room for write and grow the buffer if needed.
public Validate ( bool write, int dataSize ) : void
write bool Operation to verify. True for write and false for read.
dataSize int The size to read or write.
리턴 void