C# Class Deveel.Data.Util.ByteBuffer

A wrapper for an array of byte.
This provides various functions for altering the state of the buffer.
Afficher le fichier Open project: deveel/deveeldb

Méthodes publiques

Méthode Description
ByteBuffer ( byte buf ) : System
ByteBuffer ( byte buf, int offset, int length ) : System

Constructs the buffer.

Read ( byte b, int offset, int count ) : ByteBuffer

Reads a byte array from the buffer.

ReadByte ( ) : byte

Reads a byte from the buffer at the current position.

ReadChar ( byte arr, int offset ) : char
ReadInt2 ( ) : short

Reads a short from the buffer at the current position.

ReadInt2 ( byte arr, int offset ) : short
ReadInt4 ( ) : int

Reads an integer from the buffer at the current position.

ReadInt4 ( byte arr, int offset ) : int
ReadInt8 ( byte arr, int offset ) : long
URShift ( int number, int bits ) : int

Operates a shift on the given integer by the number of bits specified.

URShift ( int number, long bits ) : int
URShift ( long number, int bits ) : long
URShift ( long number, long bits ) : long
Write ( ByteBuffer buffer ) : ByteBuffer

Writes a ByteBuffer in to this buffer.

Write ( byte b ) : ByteBuffer
Write ( byte b, int offset, int count ) : ByteBuffer

Writes a byte array into the buffer.

WriteByte ( byte v ) : ByteBuffer

Writes a byte into the buffer at the current position.

WriteChar ( char value, byte arr, int offset ) : void
WriteInt2 ( short v ) : ByteBuffer

Writes a short into the buffer at the current position.

WriteInt2 ( short value, byte arr, int offset ) : void
WriteInt8 ( long value, byte arr, int offset ) : void
WriteInteger ( int v ) : ByteBuffer

Writes an integer into the buffer at the current position.

WriteInteger ( int value, byte arr, int offset ) : void

Method Details

ByteBuffer() public méthode

public ByteBuffer ( byte buf ) : System
buf byte
Résultat System

ByteBuffer() public méthode

Constructs the buffer.
public ByteBuffer ( byte buf, int offset, int length ) : System
buf byte
offset int
length int
Résultat System

Read() public méthode

Reads a byte array from the buffer.
public Read ( byte b, int offset, int count ) : ByteBuffer
b byte
offset int
count int
Résultat ByteBuffer

ReadByte() public méthode

Reads a byte from the buffer at the current position.
public ReadByte ( ) : byte
Résultat byte

ReadChar() public static méthode

public static ReadChar ( byte arr, int offset ) : char
arr byte
offset int
Résultat char

ReadInt2() public méthode

Reads a short from the buffer at the current position.
public ReadInt2 ( ) : short
Résultat short

ReadInt2() public static méthode

public static ReadInt2 ( byte arr, int offset ) : short
arr byte
offset int
Résultat short

ReadInt4() public méthode

Reads an integer from the buffer at the current position.
public ReadInt4 ( ) : int
Résultat int

ReadInt4() public static méthode

public static ReadInt4 ( byte arr, int offset ) : int
arr byte
offset int
Résultat int

ReadInt8() public static méthode

public static ReadInt8 ( byte arr, int offset ) : long
arr byte
offset int
Résultat long

URShift() public static méthode

Operates a shift on the given integer by the number of bits specified.
public static URShift ( int number, int bits ) : int
number int The number to shift.
bits int The number of bits to shift the given number.
Résultat int

URShift() public static méthode

public static URShift ( int number, long bits ) : int
number int
bits long
Résultat int

URShift() public static méthode

public static URShift ( long number, int bits ) : long
number long
bits int
Résultat long

URShift() public static méthode

public static URShift ( long number, long bits ) : long
number long
bits long
Résultat long

Write() public méthode

Writes a ByteBuffer in to this buffer.
public Write ( ByteBuffer buffer ) : ByteBuffer
buffer ByteBuffer
Résultat ByteBuffer

Write() public méthode

public Write ( byte b ) : ByteBuffer
b byte
Résultat ByteBuffer

Write() public méthode

Writes a byte array into the buffer.
public Write ( byte b, int offset, int count ) : ByteBuffer
b byte
offset int
count int
Résultat ByteBuffer

WriteByte() public méthode

Writes a byte into the buffer at the current position.
public WriteByte ( byte v ) : ByteBuffer
v byte
Résultat ByteBuffer

WriteChar() public static méthode

public static WriteChar ( char value, byte arr, int offset ) : void
value char
arr byte
offset int
Résultat void

WriteInt2() public méthode

Writes a short into the buffer at the current position.
public WriteInt2 ( short v ) : ByteBuffer
v short
Résultat ByteBuffer

WriteInt2() public static méthode

public static WriteInt2 ( short value, byte arr, int offset ) : void
value short
arr byte
offset int
Résultat void

WriteInt8() public static méthode

public static WriteInt8 ( long value, byte arr, int offset ) : void
value long
arr byte
offset int
Résultat void

WriteInteger() public méthode

Writes an integer into the buffer at the current position.
public WriteInteger ( int v ) : ByteBuffer
v int
Résultat ByteBuffer

WriteInteger() public static méthode

public static WriteInteger ( int value, byte arr, int offset ) : void
value int
arr byte
offset int
Résultat void