Метод | Описание | |
---|---|---|
Allocate ( byte source ) : ByteBuffer |
Creates a ByteBuffer loaded with the provided byte array.
|
|
Allocate ( int bufferCapacity ) : ByteBuffer |
Creates a ByteBuffer with a specified capacity in bytes.
|
|
Capacity ( ) : int |
Returns the capacity of the ByteBuffer
|
|
Get ( ) : byte |
Gets the current byte and advances the position by one.
|
|
GetDouble ( ) : double |
Gets the double floating point number (double) at the current position, and then advances by eight.
|
|
GetInt ( ) : int |
Gets the 32 bit integer (int) at the current position, and then advances by four.
|
|
GetLong ( ) : long |
Gets the 64 bit integer (long) at the current position, and then advances by eight.
|
|
GetShort ( ) : short |
Gets the 16 bit integer (short) at the current position, and then advances by two.
|
|
Put ( byte value ) : void |
Writes a byte value to the current position, and advances the position by one.
|
|
PutDouble ( double value ) : void |
Sets the bytes at the current position to the value of the passed value, and advances the position.
|
|
PutInt ( int value ) : void |
Sets the bytes at the current position to the value of the passed value, and advances the position.
|
|
PutInt ( int index, int value ) : void |
Sets the bytes at the provided position to the value of the passed value, and does not advance the position. This can be useful for writing a value into an earlier placeholder e.g. a header property for storing the body length. |
|
PutLong ( long value ) : void |
Sets the bytes at the current position to the value of the passed value, and advances the position.
|
|
ReadFrom ( System source, int length ) : int |
Reads from the provided System.IO.Stream, into the buffer.
|
|
Remaining ( ) : int |
The remaining capacity.
|
Метод | Описание | |
---|---|---|
BlockCopy ( |
||
BlockGet ( |
||
ByteBuffer ( int bufferCapacity ) : System | ||
CheckByteArgument ( byte value, int startIndex, int bytesRequired ) : void |
Checks the given argument for validity.
|
|
CheckedFromBytes ( byte value, int startIndex, int bytesToConvert ) : long |
Checks the arguments for validity before calling FromBytes (which can therefore assume the arguments are valid).
|
|
FromBytes ( byte buffer, int startIndex, int bytesToConvert ) : long |
Returns a value built from the specified number of bytes from the given buffer, starting at index.
|
|
Int64BitsToDouble ( long value ) : double |
Converts the specified 64-bit signed integer to a double-precision floating point number. Note: the endianness of this converter does not affect the returned value.
|
|
ToArray ( ) : byte[] |
Gets a copy of the internal byte array.
|
|
ToInt64 ( byte value, int startIndex ) : long |
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
|
public static Allocate ( byte source ) : ByteBuffer | ||
source | byte | The source byte array to load the buffer with. |
Результат | ByteBuffer |
public static Allocate ( int bufferCapacity ) : ByteBuffer | ||
bufferCapacity | int | The capacity of the buffer in bytes |
Результат | ByteBuffer |
public Put ( byte value ) : void | ||
value | byte | The byte value to write. |
Результат | void |
public PutDouble ( double value ) : void | ||
value | double | The value to set the current position to. |
Результат | void |
public PutInt ( int value ) : void | ||
value | int | The value to set the current position to. |
Результат | void |
public PutInt ( int index, int value ) : void | ||
index | int | The position to set the value at. |
value | int | The value to set. |
Результат | void |
public PutLong ( long value ) : void | ||
value | long | The value to set the current position to. |
Результат | void |
public ReadFrom ( System source, int length ) : int | ||
source | System | The source stream to read from. |
length | int | The number of bytes to read. |
Результат | int |