\Mobi_Mtld_DA_Carrier_ByteReader

This class gets a chunk of binary data (bytes) then the methods are used to read data segments based on the data of data being read from the chunk, the read pointer will advance to the next bytes.

All numeric values must be read in little endian byte order. All numeric data is signed unless the method specifies otherwise - e.g. getIntUnsigned()

Summary

Methods
Properties
Constants
__construct()
skip()
getByte()
getBoolean()
getShort()
getInt()
getIntUnsigned()
getLong()
getFloat()
getDouble()
getBytes()
getStringAscii()
getStringUtf8()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$buff
$position
N/A

Properties

$buff

$buff : 

Data buffer

Type

$position

$position : 

Pointer position

Type

Methods

__construct()

__construct(  $data) 

Creates instance.

Parameters

$data
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

skip()

skip(  $lenShort) 

Skip bytes.

Parameters

$lenShort
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

getByte()

getByte() : string

Read one byte.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

string —

Read data

getBoolean()

getBoolean() : boolean

Read 1byte as boolean.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

boolean —

Read data

getShort()

getShort() : integer

Read 2bytes as short.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

integer —

Read data

getInt()

getInt() : integer

Read 4bytes as integer.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

integer —

Read data

getIntUnsigned()

getIntUnsigned() : integer

Read 4bytes as unsigned integer.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

integer —

Read data

getLong()

getLong() : integer

Read

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

integer —

Read data

getFloat()

getFloat() : float

Read 4 bytes as float.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

float —

Read data

getDouble()

getDouble() : double

Read 8bytes as double.

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

double —

Read data

getBytes()

getBytes(  $length) : integer

Read n bytes.

Parameters

$length
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

integer —

Read data

getStringAscii()

getStringAscii(  $length) : string

Read n bytes as string.

Parameters

$length
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

string —

Read data

getStringUtf8()

getStringUtf8(  $length) : string

Read n bytes as UTF8 string.

Parameters

$length
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

string —

Read data