C# Class FlatBuffers.ByteBuffer

Class to mimick Java's ByteBuffer which is used heavily in Flatbuffers
Show file Open project: google/flatbuffers Class Usage Examples

Public Methods

Method Description
ByteBuffer ( byte buffer ) : System
ByteBuffer ( byte buffer, int pos ) : System
Get ( int index ) : byte
GetDouble ( int offset ) : double
GetFloat ( int offset ) : float
GetInt ( int offset ) : int
GetLong ( int offset ) : long
GetSbyte ( int index ) : sbyte
GetShort ( int offset ) : short
GetUint ( int offset ) : uint
GetUlong ( int offset ) : ulong
GetUshort ( int offset ) : ushort
Put ( int offset, byte value ) : void
PutByte ( int offset, byte value ) : void
PutByte ( int offset, byte value, int count ) : void
PutDouble ( int offset, double value ) : void
PutFloat ( int offset, float value ) : void
PutInt ( int offset, int value ) : void
PutLong ( int offset, long value ) : void
PutSbyte ( int offset, sbyte value ) : void
PutShort ( int offset, short value ) : void
PutUint ( int offset, uint value ) : void
PutUlong ( int offset, ulong value ) : void
PutUshort ( int offset, ushort value ) : void
Reset ( ) : void
ReverseBytes ( uint input ) : uint
ReverseBytes ( ulong input ) : ulong
ReverseBytes ( ushort input ) : ushort

Protected Methods

Method Description
ReadLittleEndian ( int offset, int count ) : ulong
WriteLittleEndian ( int offset, int count, ulong data ) : void

Private Methods

Method Description
AssertOffsetAndLength ( int offset, int length ) : void

Method Details

ByteBuffer() public method

public ByteBuffer ( byte buffer ) : System
buffer byte
return System

ByteBuffer() public method

public ByteBuffer ( byte buffer, int pos ) : System
buffer byte
pos int
return System

Get() public method

public Get ( int index ) : byte
index int
return byte

GetDouble() public method

public GetDouble ( int offset ) : double
offset int
return double

GetFloat() public method

public GetFloat ( int offset ) : float
offset int
return float

GetInt() public method

public GetInt ( int offset ) : int
offset int
return int

GetLong() public method

public GetLong ( int offset ) : long
offset int
return long

GetSbyte() public method

public GetSbyte ( int index ) : sbyte
index int
return sbyte

GetShort() public method

public GetShort ( int offset ) : short
offset int
return short

GetUint() public method

public GetUint ( int offset ) : uint
offset int
return uint

GetUlong() public method

public GetUlong ( int offset ) : ulong
offset int
return ulong

GetUshort() public method

public GetUshort ( int offset ) : ushort
offset int
return ushort

Put() public method

public Put ( int offset, byte value ) : void
offset int
value byte
return void

PutByte() public method

public PutByte ( int offset, byte value ) : void
offset int
value byte
return void

PutByte() public method

public PutByte ( int offset, byte value, int count ) : void
offset int
value byte
count int
return void

PutDouble() public method

public PutDouble ( int offset, double value ) : void
offset int
value double
return void

PutFloat() public method

public PutFloat ( int offset, float value ) : void
offset int
value float
return void

PutInt() public method

public PutInt ( int offset, int value ) : void
offset int
value int
return void

PutLong() public method

public PutLong ( int offset, long value ) : void
offset int
value long
return void

PutSbyte() public method

public PutSbyte ( int offset, sbyte value ) : void
offset int
value sbyte
return void

PutShort() public method

public PutShort ( int offset, short value ) : void
offset int
value short
return void

PutUint() public method

public PutUint ( int offset, uint value ) : void
offset int
value uint
return void

PutUlong() public method

public PutUlong ( int offset, ulong value ) : void
offset int
value ulong
return void

PutUshort() public method

public PutUshort ( int offset, ushort value ) : void
offset int
value ushort
return void

ReadLittleEndian() protected method

protected ReadLittleEndian ( int offset, int count ) : ulong
offset int
count int
return ulong

Reset() public method

public Reset ( ) : void
return void

ReverseBytes() static public method

static public ReverseBytes ( uint input ) : uint
input uint
return uint

ReverseBytes() static public method

static public ReverseBytes ( ulong input ) : ulong
input ulong
return ulong

ReverseBytes() static public method

static public ReverseBytes ( ushort input ) : ushort
input ushort
return ushort

WriteLittleEndian() protected method

protected WriteLittleEndian ( int offset, int count, ulong data ) : void
offset int
count int
data ulong
return void