PacketSerializer
extends BinaryStream
in package
Table of Contents
- $buffer : string
- $offset : int
- __construct() : mixed
- feof() : bool
- Returns whether the offset has reached the end of the buffer.
- get() : string
- getAddress() : InternetAddress
- getBool() : bool
- getBuffer() : string
- getByte() : int
- getDouble() : float
- getFloat() : float
- getInt() : int
- getLDouble() : float
- getLFloat() : float
- getLInt() : int
- getLLong() : int
- getLong() : int
- getLShort() : int
- getLTriad() : int
- getOffset() : int
- getRemaining() : string
- getRoundedFloat() : float
- getRoundedLFloat() : float
- getShort() : int
- getSignedLShort() : int
- getSignedShort() : int
- getString() : string
- getTriad() : int
- getUnsignedVarInt() : int
- Reads a 32-bit variable-length unsigned integer from the buffer and returns it.
- getUnsignedVarLong() : int
- Reads a 64-bit variable-length integer from the buffer and returns it.
- getVarInt() : int
- Reads a 32-bit zigzag-encoded variable-length integer from the buffer and returns it.
- getVarLong() : int
- Reads a 64-bit zigzag-encoded variable-length integer from the buffer and returns it.
- put() : void
- putAddress() : void
- putBool() : void
- putByte() : void
- putDouble() : void
- putFloat() : void
- putInt() : void
- putLDouble() : void
- putLFloat() : void
- putLInt() : void
- putLLong() : void
- putLong() : void
- putLShort() : void
- putLTriad() : void
- putShort() : void
- putString() : void
- putTriad() : void
- putUnsignedVarInt() : void
- Writes a 32-bit variable-length unsigned integer to the end of the buffer.
- putUnsignedVarLong() : void
- Writes a 64-bit variable-length integer to the end of the buffer.
- putVarInt() : void
- Writes a 32-bit zigzag-encoded variable-length integer to the end of the buffer.
- putVarLong() : void
- Writes a 64-bit zigzag-encoded variable-length integer to the end of the buffer.
- rewind() : void
- Rewinds the stream pointer to the start.
- setOffset() : void
Properties
$buffer
protected
string
$buffer
$offset
protected
int
$offset
Methods
__construct()
public
__construct([string $buffer = "" ][, int $offset = 0 ]) : mixed
Parameters
- $buffer : string = ""
- $offset : int = 0
Return values
mixed —feof()
Returns whether the offset has reached the end of the buffer.
public
feof() : bool
Return values
bool —get()
public
get(int $len) : string
Parameters
- $len : int
Tags
Return values
string —getAddress()
public
getAddress() : InternetAddress
Tags
Return values
InternetAddress —getBool()
public
getBool() : bool
Tags
Return values
bool —getBuffer()
public
getBuffer() : string
Return values
string —getByte()
public
getByte() : int
Tags
Return values
int —getDouble()
public
getDouble() : float
Tags
Return values
float —getFloat()
public
getFloat() : float
Tags
Return values
float —getInt()
public
getInt() : int
Tags
Return values
int —getLDouble()
public
getLDouble() : float
Tags
Return values
float —getLFloat()
public
getLFloat() : float
Tags
Return values
float —getLInt()
public
getLInt() : int
Tags
Return values
int —getLLong()
public
getLLong() : int
Tags
Return values
int —getLong()
public
getLong() : int
Tags
Return values
int —getLShort()
public
getLShort() : int
Tags
Return values
int —getLTriad()
public
getLTriad() : int
Tags
Return values
int —getOffset()
public
getOffset() : int
Return values
int —getRemaining()
public
getRemaining() : string
Tags
Return values
string —getRoundedFloat()
public
getRoundedFloat(int $accuracy) : float
Parameters
- $accuracy : int
Tags
Return values
float —getRoundedLFloat()
public
getRoundedLFloat(int $accuracy) : float
Parameters
- $accuracy : int
Tags
Return values
float —getShort()
public
getShort() : int
Tags
Return values
int —getSignedLShort()
public
getSignedLShort() : int
Tags
Return values
int —getSignedShort()
public
getSignedShort() : int
Tags
Return values
int —getString()
public
getString() : string
Tags
Return values
string —getTriad()
public
getTriad() : int
Tags
Return values
int —getUnsignedVarInt()
Reads a 32-bit variable-length unsigned integer from the buffer and returns it.
public
getUnsignedVarInt() : int
Tags
Return values
int —getUnsignedVarLong()
Reads a 64-bit variable-length integer from the buffer and returns it.
public
getUnsignedVarLong() : int
Tags
Return values
int —getVarInt()
Reads a 32-bit zigzag-encoded variable-length integer from the buffer and returns it.
public
getVarInt() : int
Tags
Return values
int —getVarLong()
Reads a 64-bit zigzag-encoded variable-length integer from the buffer and returns it.
public
getVarLong() : int
Tags
Return values
int —put()
public
put(string $str) : void
Parameters
- $str : string
Return values
void —putAddress()
public
putAddress(InternetAddress $address) : void
Parameters
- $address : InternetAddress
Return values
void —putBool()
public
putBool(bool $v) : void
Parameters
- $v : bool
Return values
void —putByte()
public
putByte(int $v) : void
Parameters
- $v : int
Return values
void —putDouble()
public
putDouble(float $v) : void
Parameters
- $v : float
Return values
void —putFloat()
public
putFloat(float $v) : void
Parameters
- $v : float
Return values
void —putInt()
public
putInt(int $v) : void
Parameters
- $v : int
Return values
void —putLDouble()
public
putLDouble(float $v) : void
Parameters
- $v : float
Return values
void —putLFloat()
public
putLFloat(float $v) : void
Parameters
- $v : float
Return values
void —putLInt()
public
putLInt(int $v) : void
Parameters
- $v : int
Return values
void —putLLong()
public
putLLong(int $v) : void
Parameters
- $v : int
Return values
void —putLong()
public
putLong(int $v) : void
Parameters
- $v : int
Return values
void —putLShort()
public
putLShort(int $v) : void
Parameters
- $v : int
Return values
void —putLTriad()
public
putLTriad(int $v) : void
Parameters
- $v : int
Return values
void —putShort()
public
putShort(int $v) : void
Parameters
- $v : int
Return values
void —putString()
public
putString(string $v) : void
Parameters
- $v : string
Return values
void —putTriad()
public
putTriad(int $v) : void
Parameters
- $v : int
Return values
void —putUnsignedVarInt()
Writes a 32-bit variable-length unsigned integer to the end of the buffer.
public
putUnsignedVarInt(int $v) : void
Parameters
- $v : int
Return values
void —putUnsignedVarLong()
Writes a 64-bit variable-length integer to the end of the buffer.
public
putUnsignedVarLong(int $v) : void
Parameters
- $v : int
Return values
void —putVarInt()
Writes a 32-bit zigzag-encoded variable-length integer to the end of the buffer.
public
putVarInt(int $v) : void
Parameters
- $v : int
Return values
void —putVarLong()
Writes a 64-bit zigzag-encoded variable-length integer to the end of the buffer.
public
putVarLong(int $v) : void
Parameters
- $v : int
Return values
void —rewind()
Rewinds the stream pointer to the start.
public
rewind() : void
Return values
void —setOffset()
public
setOffset(int $offset) : void
Parameters
- $offset : int