C# 클래스 FoundationDB.Client.SliceReader

Helper class that holds the internal state used to parse tuples from slices
파일 보기 프로젝트 열기: BedeGaming/foundationdb-dotnet-client 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Position int

공개 메소드들

메소드 설명
EnsureBytes ( int count ) : void

Ensure that there are at least count bytes remaining in the buffer

FromBuffer ( byte buffer ) : SliceReader

Creates a reader on a byte array

FromBuffer ( byte buffer, int offset, int count ) : SliceReader

Creates a reader on a segment of a byte array

ReadByte ( ) : byte

Read the next byte from the buffer

ReadByteString ( ) : Slice

Read an encoded nul-terminated byte array from the buffer

ReadBytes ( int count ) : Slice

Read the next count bytes from the buffer

ReadFixed16 ( ) : ushort

Read the next 2 bytes as an unsigned 16-bit integer, encoded in little-endian

ReadFixed16BE ( ) : ushort

Read the next 2 bytes as an unsigned 16-bit integer, encoded in big-endian

ReadFixed32 ( ) : uint

Read the next 4 bytes as an unsigned 32-bit integer, encoded in little-endian

ReadFixed32BE ( ) : uint

Read the next 4 bytes as an unsigned 32-bit integer, encoded in big-endian

ReadFixed64 ( ) : ulong

Read the next 8 bytes as an unsigned 64-bit integer, encoded in little-endian

ReadFixed64BE ( ) : ulong

Read the next 8 bytes as an unsigned 64-bit integer, encoded in big-endian

ReadVarbytes ( ) : Slice

Reads a variable sized slice, by first reading its size (stored as a Varint32) and then the data

ReadVarint16 ( ) : ushort

Reads a 7-bit encoded unsigned int (aka 'Varint16') from the buffer, and advances the cursor

Can Read up to 3 bytes from the input

ReadVarint32 ( ) : uint

Reads a 7-bit encoded unsigned int (aka 'Varint32') from the buffer, and advances the cursor

Can Read up to 5 bytes from the input

ReadVarint64 ( ) : ulong

Reads a 7-bit encoded unsigned long (aka 'Varint32') from the buffer, and advances the cursor

Can Read up to 10 bytes from the input

Skip ( int count ) : void

Skip the next count bytes of the buffer

SliceReader ( Slice buffer ) : JetBrains.Annotations

Creates a new reader over a slice

비공개 메소드들

메소드 설명
PeekByte ( ) : int
ReadVarint ( int count ) : ulong

Reads a Base 128 Varint from the input

메소드 상세

EnsureBytes() 공개 메소드

Ensure that there are at least count bytes remaining in the buffer
public EnsureBytes ( int count ) : void
count int
리턴 void

FromBuffer() 공개 정적인 메소드

Creates a reader on a byte array
public static FromBuffer ( byte buffer ) : SliceReader
buffer byte
리턴 SliceReader

FromBuffer() 공개 정적인 메소드

Creates a reader on a segment of a byte array
public static FromBuffer ( byte buffer, int offset, int count ) : SliceReader
buffer byte
offset int
count int
리턴 SliceReader

ReadByte() 공개 메소드

Read the next byte from the buffer
public ReadByte ( ) : byte
리턴 byte

ReadByteString() 공개 메소드

Read an encoded nul-terminated byte array from the buffer
public ReadByteString ( ) : Slice
리턴 Slice

ReadBytes() 공개 메소드

Read the next count bytes from the buffer
public ReadBytes ( int count ) : Slice
count int
리턴 Slice

ReadFixed16() 공개 메소드

Read the next 2 bytes as an unsigned 16-bit integer, encoded in little-endian
public ReadFixed16 ( ) : ushort
리턴 ushort

ReadFixed16BE() 공개 메소드

Read the next 2 bytes as an unsigned 16-bit integer, encoded in big-endian
public ReadFixed16BE ( ) : ushort
리턴 ushort

ReadFixed32() 공개 메소드

Read the next 4 bytes as an unsigned 32-bit integer, encoded in little-endian
public ReadFixed32 ( ) : uint
리턴 uint

ReadFixed32BE() 공개 메소드

Read the next 4 bytes as an unsigned 32-bit integer, encoded in big-endian
public ReadFixed32BE ( ) : uint
리턴 uint

ReadFixed64() 공개 메소드

Read the next 8 bytes as an unsigned 64-bit integer, encoded in little-endian
public ReadFixed64 ( ) : ulong
리턴 ulong

ReadFixed64BE() 공개 메소드

Read the next 8 bytes as an unsigned 64-bit integer, encoded in big-endian
public ReadFixed64BE ( ) : ulong
리턴 ulong

ReadVarbytes() 공개 메소드

Reads a variable sized slice, by first reading its size (stored as a Varint32) and then the data
public ReadVarbytes ( ) : Slice
리턴 Slice

ReadVarint16() 공개 메소드

Reads a 7-bit encoded unsigned int (aka 'Varint16') from the buffer, and advances the cursor
Can Read up to 3 bytes from the input
public ReadVarint16 ( ) : ushort
리턴 ushort

ReadVarint32() 공개 메소드

Reads a 7-bit encoded unsigned int (aka 'Varint32') from the buffer, and advances the cursor
Can Read up to 5 bytes from the input
public ReadVarint32 ( ) : uint
리턴 uint

ReadVarint64() 공개 메소드

Reads a 7-bit encoded unsigned long (aka 'Varint32') from the buffer, and advances the cursor
Can Read up to 10 bytes from the input
public ReadVarint64 ( ) : ulong
리턴 ulong

Skip() 공개 메소드

Skip the next count bytes of the buffer
public Skip ( int count ) : void
count int
리턴 void

SliceReader() 공개 메소드

Creates a new reader over a slice
public SliceReader ( Slice buffer ) : JetBrains.Annotations
buffer Slice Slice that will be used as the underlying buffer
리턴 JetBrains.Annotations

프로퍼티 상세

Position 공개적으로 프로퍼티

Current position inside the buffer
public int Position
리턴 int