C# 클래스 System.IO.Compression.ByteBuffer

A byte[] array that also stores a current offset. Useful for reading/writing headers, ensuring the offset is updated correctly.
파일 보기 프로젝트 열기: garyjohnson/wpnest 1 사용 예제들

공개 메소드들

메소드 설명
ByteBuffer ( int size )

Initializes a new instance of the ByteBuffer type.

ReadContentsFrom ( Stream reader ) : int

Fills the buffer from the stream.

ReadUInt16 ( ) : ushort

Reads a 16-bit unsigned integer from the buffer.

ReadUInt32 ( ) : uint

Reads a 32-bit unsigned integer from the buffer.

SkipBytes ( int count ) : void

Skips ahead a count of bytes.

WriteContentsTo ( Stream writer ) : void

Writes the contents of the buffer to a stream.

WriteUInt16 ( ushort value ) : void

Writes an unsigned short value to the buffer.

WriteUInt32 ( uint value ) : void

Write an unsigned integer to the buffer.

메소드 상세

ByteBuffer() 공개 메소드

Initializes a new instance of the ByteBuffer type.
public ByteBuffer ( int size )
size int The buffer size.

ReadContentsFrom() 공개 메소드

Fills the buffer from the stream.
public ReadContentsFrom ( Stream reader ) : int
reader Stream The stream to read from.
리턴 int

ReadUInt16() 공개 메소드

Reads a 16-bit unsigned integer from the buffer.
public ReadUInt16 ( ) : ushort
리턴 ushort

ReadUInt32() 공개 메소드

Reads a 32-bit unsigned integer from the buffer.
public ReadUInt32 ( ) : uint
리턴 uint

SkipBytes() 공개 메소드

Skips ahead a count of bytes.
public SkipBytes ( int count ) : void
count int The number of bytes to skip.
리턴 void

WriteContentsTo() 공개 메소드

Writes the contents of the buffer to a stream.
public WriteContentsTo ( Stream writer ) : void
writer Stream The stream to write to.
리턴 void

WriteUInt16() 공개 메소드

Writes an unsigned short value to the buffer.
public WriteUInt16 ( ushort value ) : void
value ushort The value to write.
리턴 void

WriteUInt32() 공개 메소드

Write an unsigned integer to the buffer.
public WriteUInt32 ( uint value ) : void
value uint The value to write.
리턴 void