PocketMine
Binary Class Reference

Static Public Member Functions

static readTriad ($str)
 
static writeTriad ($value)
 
static readLTriad ($str)
 
static writeLTriad ($value)
 
static writeMetadata (array $data)
 
static readMetadata ($value, $types=false)
 
static readBool ($b)
 
static writeBool ($b)
 
static readByte ($c, $signed=true)
 
static writeByte ($c)
 
static readShort ($str)
 
static readSignedShort ($str)
 
static writeShort ($value)
 
static readLShort ($str)
 
static readSignedLShort ($str)
 
static writeLShort ($value)
 
static readInt ($str)
 
static writeInt ($value)
 
static readLInt ($str)
 
static writeLInt ($value)
 
static readFloat ($str)
 
static writeFloat ($value)
 
static readLFloat ($str)
 
static writeLFloat ($value)
 
static printFloat ($value)
 
static readDouble ($str)
 
static writeDouble ($value)
 
static readLDouble ($str)
 
static writeLDouble ($value)
 
static readLong ($x)
 
static writeLong ($value)
 
static readLLong ($str)
 
static writeLLong ($value)
 

Data Fields

const BIG_ENDIAN = 0x00
 
const LITTLE_ENDIAN = 0x01
 

Member Function Documentation

static readBool (   $b)
static

Reads a byte boolean

Parameters
$b
Returns
bool
static readByte (   $c,
  $signed = true 
)
static

Reads an unsigned/signed byte

Parameters
string$c
bool$signed
Returns
int
static readLShort (   $str)
static

Reads a 16-bit unsigned little-endian number

Parameters
$str
Returns
int
static readLTriad (   $str)
static

Reads a 3-byte little-endian number

Parameters
$str
Returns
mixed
static readMetadata (   $value,
  $types = false 
)
static

Reads a metadata coded string

Parameters
$value
bool$types
Returns
array
static readShort (   $str)
static

Reads a 16-bit unsigned big-endian number

Parameters
$str
Returns
int
static readSignedLShort (   $str)
static

Reads a 16-bit signed little-endian number

Parameters
$str
Returns
int
static readSignedShort (   $str)
static

Reads a 16-bit signed big-endian number

Parameters
$str
Returns
int
static readTriad (   $str)
static

Reads a 3-byte big-endian number

Parameters
$str
Returns
mixed
static writeBool (   $b)
static

Writes a byte boolean

Parameters
$b
Returns
bool|string
static writeByte (   $c)
static

Writes an unsigned/signed byte

Parameters
$c
Returns
string
static writeLShort (   $value)
static

Writes a 16-bit signed/unsigned little-endian number

Parameters
$value
Returns
string
static writeLTriad (   $value)
static

Writes a 3-byte little-endian number

Parameters
$value
Returns
string
static writeMetadata ( array  $data)
static

Writes a coded metadata string

Parameters
array$data
Returns
string
static writeShort (   $value)
static

Writes a 16-bit signed/unsigned big-endian number

Parameters
$value
Returns
string
static writeTriad (   $value)
static

Writes a 3-byte big-endian number

Parameters
$value
Returns
string

The documentation for this class was generated from the following file: