PHP Class pocketmine\utils\Binary

Afficher le fichier Open project: iTXTech/Genisys Class Usage Examples

Méthodes publiques

Méthode 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 méthode

public static printFloat ( $value )

readBool() public static méthode

Reads a byte boolean
public static readBool ( $b ) : boolean
$b
Résultat boolean

readByte() public static méthode

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

readDouble() public static méthode

public static readDouble ( $str )

readFloat() public static méthode

public static readFloat ( $str )

readInt() public static méthode

public static readInt ( $str )

readLDouble() public static méthode

public static readLDouble ( $str )

readLFloat() public static méthode

public static readLFloat ( $str )

readLInt() public static méthode

public static readLInt ( $str )

readLLong() public static méthode

public static readLLong ( $str )

readLShort() public static méthode

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

readLTriad() public static méthode

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

readLong() public static méthode

public static readLong ( $x )

readMetadata() public static méthode

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

readShort() public static méthode

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

readSignedLShort() public static méthode

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

readSignedShort() public static méthode

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

readTriad() public static méthode

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

writeBool() public static méthode

Writes a byte boolean
public static writeBool ( $b ) : boolean | string
$b
Résultat boolean | string

writeByte() public static méthode

Writes an unsigned/signed byte
public static writeByte ( $c ) : string
$c
Résultat string

writeDouble() public static méthode

public static writeDouble ( $value )

writeFloat() public static méthode

public static writeFloat ( $value )

writeInt() public static méthode

public static writeInt ( $value )

writeLDouble() public static méthode

public static writeLDouble ( $value )

writeLFloat() public static méthode

public static writeLFloat ( $value )

writeLInt() public static méthode

public static writeLInt ( $value )

writeLLong() public static méthode

public static writeLLong ( $value )

writeLShort() public static méthode

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

writeLTriad() public static méthode

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

writeLong() public static méthode

public static writeLong ( $value )

writeMetadata() public static méthode

Writes a coded metadata string
public static writeMetadata ( array $data ) : string
$data array
Résultat string

writeShort() public static méthode

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

writeTriad() public static méthode

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