PHP Class pocketmine\utils\Binary

Mostra file Open project: iTXTech/Genisys Class Usage Examples

Public Methods

Method Description
printFloat ( $value )
readBool ( $b ) : boolean Reads a byte boolean
readByte ( string $c, boolean $signed = true ) : integer Reads an unsigned/signed byte
readDouble ( $str )
readFloat ( $str )
readInt ( $str )
readLDouble ( $str )
readLFloat ( $str )
readLInt ( $str )
readLLong ( $str )
readLShort ( $str ) : integer Reads a 16-bit unsigned little-endian number
readLTriad ( $str ) : mixed Reads a 3-byte little-endian number
readLong ( $x )
readMetadata ( $value, boolean $types = false ) : array Reads a metadata coded string
readShort ( $str ) : integer Reads a 16-bit unsigned big-endian number
readSignedLShort ( $str ) : integer Reads a 16-bit signed little-endian number
readSignedShort ( $str ) : integer Reads a 16-bit signed big-endian number
readTriad ( $str ) : mixed Reads a 3-byte big-endian number
writeBool ( $b ) : boolean | string Writes a byte boolean
writeByte ( $c ) : string Writes an unsigned/signed byte
writeDouble ( $value )
writeFloat ( $value )
writeInt ( $value )
writeLDouble ( $value )
writeLFloat ( $value )
writeLInt ( $value )
writeLLong ( $value )
writeLShort ( $value ) : string Writes a 16-bit signed/unsigned little-endian number
writeLTriad ( $value ) : string Writes a 3-byte little-endian number
writeLong ( $value )
writeMetadata ( array $data ) : string Writes a coded metadata string
writeShort ( $value ) : string Writes a 16-bit signed/unsigned big-endian number
writeTriad ( $value ) : string Writes a 3-byte big-endian number

Method Details

printFloat() public static method

public static printFloat ( $value )

readBool() public static method

Reads a byte boolean
public static readBool ( $b ) : boolean
$b
return boolean

readByte() public static method

Reads an unsigned/signed byte
public static readByte ( string $c, boolean $signed = true ) : integer
$c string
$signed boolean
return integer

readDouble() public static method

public static readDouble ( $str )

readFloat() public static method

public static readFloat ( $str )

readInt() public static method

public static readInt ( $str )

readLDouble() public static method

public static readLDouble ( $str )

readLFloat() public static method

public static readLFloat ( $str )

readLInt() public static method

public static readLInt ( $str )

readLLong() public static method

public static readLLong ( $str )

readLShort() public static method

Reads a 16-bit unsigned little-endian number
public static readLShort ( $str ) : integer
$str
return integer

readLTriad() public static method

Reads a 3-byte little-endian number
public static readLTriad ( $str ) : mixed
$str
return mixed

readLong() public static method

public static readLong ( $x )

readMetadata() public static method

Reads a metadata coded string
public static readMetadata ( $value, boolean $types = false ) : array
$value
$types boolean
return array

readShort() public static method

Reads a 16-bit unsigned big-endian number
public static readShort ( $str ) : integer
$str
return integer

readSignedLShort() public static method

Reads a 16-bit signed little-endian number
public static readSignedLShort ( $str ) : integer
$str
return integer

readSignedShort() public static method

Reads a 16-bit signed big-endian number
public static readSignedShort ( $str ) : integer
$str
return integer

readTriad() public static method

Reads a 3-byte big-endian number
public static readTriad ( $str ) : mixed
$str
return mixed

writeBool() public static method

Writes a byte boolean
public static writeBool ( $b ) : boolean | string
$b
return boolean | string

writeByte() public static method

Writes an unsigned/signed byte
public static writeByte ( $c ) : string
$c
return string

writeDouble() public static method

public static writeDouble ( $value )

writeFloat() public static method

public static writeFloat ( $value )

writeInt() public static method

public static writeInt ( $value )

writeLDouble() public static method

public static writeLDouble ( $value )

writeLFloat() public static method

public static writeLFloat ( $value )

writeLInt() public static method

public static writeLInt ( $value )

writeLLong() public static method

public static writeLLong ( $value )

writeLShort() public static method

Writes a 16-bit signed/unsigned little-endian number
public static writeLShort ( $value ) : string
$value
return string

writeLTriad() public static method

Writes a 3-byte little-endian number
public static writeLTriad ( $value ) : string
$value
return string

writeLong() public static method

public static writeLong ( $value )

writeMetadata() public static method

Writes a coded metadata string
public static writeMetadata ( array $data ) : string
$data array
return string

writeShort() public static method

Writes a 16-bit signed/unsigned big-endian number
public static writeShort ( $value ) : string
$value
return string

writeTriad() public static method

Writes a 3-byte big-endian number
public static writeTriad ( $value ) : string
$value
return string