Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.Buffering.NewByteBuffer Class Reference

More...

Public Member Functions

 NewByteBuffer ()
 Constructor. More...
 
 NewByteBuffer (long capacity)
 
 NewByteBuffer (byte[] buffer)
 Constructor. More...
 
 NewByteBuffer (NewByteBuffer buffer)
 Constructor. More...
 
NewByteBuffer Compact ()
 The bytes between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the byte at index p = position() is copied to index zero, the byte at index p + 1 is copied to index one, and so forth until the byte at index limit() - 1 is copied to index n = limit() - 1 - p. The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded. More...
 
NewByteBuffer Flip ()
 Flips this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded. More...
 
NewByteBuffer Clear ()
 Clears this buffer. The position is set to zero, the limit is set to the capacity, and the mark is discarded. More...
 
NewByteBuffer Rewind ()
 Rewinds this buffer. The position is set to zero and the mark is discarded. More...
 
NewByteBuffer Put (bool value)
 Writes a one-byte boolean value to the buffer, with 0 representing 'false' and 1 representing 'true', and advances the position by one byte. More...
 
NewByteBuffer Put (sbyte value)
 Writes a signed byte to the buffer and advances the position by one byte. More...
 
NewByteBuffer Put (byte[] buffer)
 Writes a byte array to the buffer. More...
 
NewByteBuffer Put (char[] chars)
 Writes a character array to the buffer and advances the current position of the buffer in accordance with the encoding used and the specific characters being written to the buffer. More...
 
NewByteBuffer Put (byte value)
 Writes an unsigned byte to the buffer and advances the position by one byte. More...
 
NewByteBuffer Put (char ch)
 Writes a unicode character to the buffer and advances the current position of the buffer in accordance with the encoding used and the specific characters being written to the buffer. More...
 
NewByteBuffer Put (decimal value)
 Writes a decimal value to the buffer and advances the buffer position by sixteen bytes. More...
 
NewByteBuffer Put (double value)
 Writes an eight-byte floating-point value to the buffer and advances the buffer position by eight bytes. More...
 
NewByteBuffer Put (short value)
 Writes a two-byte signed integer to the buffer and advances the buffer position by two bytes. More...
 
NewByteBuffer Put (int value)
 Writes a four-byte signed integer to the buffer and advances the buffer position by four bytes. More...
 
NewByteBuffer Put (long value)
 Writes an eight-byte signed integer to the buffer and advances the buffer position by eight bytes. More...
 
NewByteBuffer Put (float value)
 Writes a four-byte floating-point value to the buffer and advances the buffer position by four bytes. More...
 
NewByteBuffer Put (string value)
 Writes a length-prefixed string to the buffer in the current encoding of the BinaryWriter, and advances the current position of the buffer in accordance with the encoding used and the specific characters being written. More...
 
NewByteBuffer Put (ushort value)
 Writes a two-byte unsigned integer to the buffer and advances the position by two bytes. More...
 
NewByteBuffer Put (uint value)
 Writes a four-byte unsigned integer to the buffer and advances the position by four bytes. More...
 
NewByteBuffer Put (ulong value)
 Writes an eight-byte unsigned integer to the buffer and advances the position by eight bytes. More...
 
NewByteBuffer Put (byte[] buffer, int index, int count)
 Writes a region of a byte array to the buffer. More...
 
NewByteBuffer Put (char[] chars, int index, int count)
 Writes a section of a character array to the buffer, and advances the current position of the buffer in accordance with the encoding used and perhaps the specific characters being written to the buffer. More...
 
int PeekChar ()
 Returns the next available character and does not advance the byte or character position. More...
 
int GetBytes (byte[] buffer, int index, int count)
 Reads count bytes from the buffer with index as the starting point in the byte array. More...
 
int GetChars (char[] buffer, int index, int count)
 Reads count characters from the buffer with index as the starting point in the character array. More...
 
bool GetBoolean ()
 Reads a boolean value from the buffer and advances the current position of the buffer by one byte. More...
 
byte Get ()
 Reads the next byte from the buffer and advances the current position of the buffer by one byte. More...
 
byte[] GetBytes (int count)
 Reads count bytes from the buffer into a byte array and advances the current position of the stream by count bytes. More...
 
char GetChar ()
 Reads the next character from the buffer and advances the current position in the buffer in accordance with the encoding used and the specific character being read from the stream. More...
 
char[] GetChars (int count)
 Reads count characters from the buffer, returns the data in a character array, and advances the current position in accordance with the encoding used and the specific character being read from the stream. More...
 
decimal GetDecimal ()
 Reads a decimal value from the buffer and advances the current position of the buffer by sixteen bytes. More...
 
double GetDouble ()
 Reads an eight-byte floating-point value from the buffer and advances the current position of the buffer by eight bytes. More...
 
short GetShort ()
 Reads a two-byte floating-point value from the buffer and advances the current position of the buffer by two bytes. More...
 
int GetInt32 ()
 Reads a four-byte floating-point value from the buffer and advances the current position of the buffer by four bytes. More...
 
long GetLong ()
 Reads an eight-byte signed integer from the buffer and advances the current position of the buffer by eight bytes. More...
 
sbyte GetSByte ()
 Reads a signed byte from the buffer and advances the current position of the buffer by one byte. More...
 
float GetFloat ()
 Reads a four-byte floating-point value from the buffer and advances the current position of the buffer by four bytes. More...
 
string GetString ()
 Reads a string from the buffer. The string is prefixed with the length, encoded as an integer seven bits at a time. More...
 
ushort GetUInt16 ()
 Reads a two-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by two bytes. More...
 
uint GetUInt32 ()
 Reads a four-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by four bytes. More...
 
ulong GetUInt64 ()
 Reads an eight-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by eight bytes. More...
 

Protected Member Functions

void DoCompact ()
 Compacts this buffer. More...
 

Properties

long Limit [get, set]
 
long Length [get]
 Gets the length of the buffer. More...
 
int Capacity [get, set]
 Get/set the capacity of this buffer. More...
 
long Position [get, set]
 Get/set the position of this buffer. More...
 
long Remaining [get]
 
bool HasRemaining [get]
 
byte[] Bytes [get]
 

Detailed Description

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.Buffering.NewByteBuffer.NewByteBuffer ( )

Constructor.

PushTechnology.DiffusionCore.Buffering.NewByteBuffer.NewByteBuffer ( long  capacity)

Parameters
capacity
PushTechnology.DiffusionCore.Buffering.NewByteBuffer.NewByteBuffer ( byte[]  buffer)

Constructor.

Parameters
buffer
PushTechnology.DiffusionCore.Buffering.NewByteBuffer.NewByteBuffer ( NewByteBuffer  buffer)

Constructor.

Parameters
buffer

Member Function Documentation

NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Clear ( )

Clears this buffer. The position is set to zero, the limit is set to the capacity, and the mark is discarded.

Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Compact ( )

The bytes between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the byte at index p = position() is copied to index zero, the byte at index p + 1 is copied to index one, and so forth until the byte at index limit() - 1 is copied to index n = limit() - 1 - p. The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded.

Returns
void PushTechnology.DiffusionCore.Buffering.NewByteBuffer.DoCompact ( )
protected

Compacts this buffer.

NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Flip ( )

Flips this buffer. The limit is set to the current position and then the position is set to zero. If the mark is defined then it is discarded.

Returns
byte PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Get ( )

Reads the next byte from the buffer and advances the current position of the buffer by one byte.

Returns
bool PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetBoolean ( )

Reads a boolean value from the buffer and advances the current position of the buffer by one byte.

Returns
int PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetBytes ( byte[]  buffer,
int  index,
int  count 
)

Reads count bytes from the buffer with index as the starting point in the byte array.

Parameters
buffer
index
count
Returns
byte [] PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetBytes ( int  count)

Reads count bytes from the buffer into a byte array and advances the current position of the stream by count bytes.

Parameters
count
Returns
char PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetChar ( )

Reads the next character from the buffer and advances the current position in the buffer in accordance with the encoding used and the specific character being read from the stream.

Returns
int PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetChars ( char[]  buffer,
int  index,
int  count 
)

Reads count characters from the buffer with index as the starting point in the character array.

Parameters
buffer
index
count
Returns
char [] PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetChars ( int  count)

Reads count characters from the buffer, returns the data in a character array, and advances the current position in accordance with the encoding used and the specific character being read from the stream.

Parameters
count
Returns
decimal PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetDecimal ( )

Reads a decimal value from the buffer and advances the current position of the buffer by sixteen bytes.

Returns
double PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetDouble ( )

Reads an eight-byte floating-point value from the buffer and advances the current position of the buffer by eight bytes.

Returns
float PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetFloat ( )

Reads a four-byte floating-point value from the buffer and advances the current position of the buffer by four bytes.

Returns
int PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetInt32 ( )

Reads a four-byte floating-point value from the buffer and advances the current position of the buffer by four bytes.

Returns
long PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetLong ( )

Reads an eight-byte signed integer from the buffer and advances the current position of the buffer by eight bytes.

Returns
sbyte PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetSByte ( )

Reads a signed byte from the buffer and advances the current position of the buffer by one byte.

Returns
short PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetShort ( )

Reads a two-byte floating-point value from the buffer and advances the current position of the buffer by two bytes.

Returns
string PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetString ( )

Reads a string from the buffer. The string is prefixed with the length, encoded as an integer seven bits at a time.

Returns
ushort PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetUInt16 ( )

Reads a two-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by two bytes.

Returns
uint PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetUInt32 ( )

Reads a four-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by four bytes.

Returns
ulong PushTechnology.DiffusionCore.Buffering.NewByteBuffer.GetUInt64 ( )

Reads an eight-byte unsigned integer from the buffer using little-endian encoding and advances the position of the buffer by eight bytes.

Returns
int PushTechnology.DiffusionCore.Buffering.NewByteBuffer.PeekChar ( )

Returns the next available character and does not advance the byte or character position.

Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( bool  value)

Writes a one-byte boolean value to the buffer, with 0 representing 'false' and 1 representing 'true', and advances the position by one byte.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( sbyte  value)

Writes a signed byte to the buffer and advances the position by one byte.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( byte[]  buffer)

Writes a byte array to the buffer.

Parameters
buffer
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( char[]  chars)

Writes a character array to the buffer and advances the current position of the buffer in accordance with the encoding used and the specific characters being written to the buffer.

Parameters
chars
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( byte  value)

Writes an unsigned byte to the buffer and advances the position by one byte.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( char  ch)

Writes a unicode character to the buffer and advances the current position of the buffer in accordance with the encoding used and the specific characters being written to the buffer.

Parameters
ch
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( decimal  value)

Writes a decimal value to the buffer and advances the buffer position by sixteen bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( double  value)

Writes an eight-byte floating-point value to the buffer and advances the buffer position by eight bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( short  value)

Writes a two-byte signed integer to the buffer and advances the buffer position by two bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( int  value)

Writes a four-byte signed integer to the buffer and advances the buffer position by four bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( long  value)

Writes an eight-byte signed integer to the buffer and advances the buffer position by eight bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( float  value)

Writes a four-byte floating-point value to the buffer and advances the buffer position by four bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( string  value)

Writes a length-prefixed string to the buffer in the current encoding of the BinaryWriter, and advances the current position of the buffer in accordance with the encoding used and the specific characters being written.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( ushort  value)

Writes a two-byte unsigned integer to the buffer and advances the position by two bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( uint  value)

Writes a four-byte unsigned integer to the buffer and advances the position by four bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( ulong  value)

Writes an eight-byte unsigned integer to the buffer and advances the position by eight bytes.

Parameters
value
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( byte[]  buffer,
int  index,
int  count 
)

Writes a region of a byte array to the buffer.

Parameters
buffer
index
count
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Put ( char[]  chars,
int  index,
int  count 
)

Writes a section of a character array to the buffer, and advances the current position of the buffer in accordance with the encoding used and perhaps the specific characters being written to the buffer.

Parameters
chars
index
count
Returns
NewByteBuffer PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Rewind ( )

Rewinds this buffer. The position is set to zero and the mark is discarded.

Returns

Property Documentation

byte [] PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Bytes
get

int PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Capacity
getset

Get/set the capacity of this buffer.

bool PushTechnology.DiffusionCore.Buffering.NewByteBuffer.HasRemaining
get

long PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Length
get

Gets the length of the buffer.

long PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Limit
getset

long PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Position
getset

Get/set the position of this buffer.

long PushTechnology.DiffusionCore.Buffering.NewByteBuffer.Remaining
get