SetaPDF_Core_Reader_Binary Class representing a binary reader

File: /SetaPDF/Core/Reader/Binary.php

Class hierarchy

Summary

Constants

BYTE_ORDER_BIG_ENDIAN

Big endian byte order

BYTE_ORDER_LITTLE_ENDIAN

Little endian byte order


Properties

$_reader


Methods

__construct()

public SetaPDF_Core_Reader_Binary::__construct ( SetaPDF_Core_Reader_ReaderInterface $reader )

The constructor.

Parameters
$reader : SetaPDF_Core_Reader_ReaderInterface
 

cleanUp()

public void SetaPDF_Core_Reader_Binary::cleanUp ( void )

Release resources/cycled references.

getReader()

public SetaPDF_Core_Reader_ReaderInterface SetaPDF_Core_Reader_Binary::getReader ( void )

Get the reader.

readByte()

public string SetaPDF_Core_Reader_Binary::readByte ( [ integer $pos = null ] )

Read a single byte.

Parameters
$pos : integer
 

readBytes()

public string SetaPDF_Core_Reader_Binary::readBytes ( integer $length [, integer $pos = null ] )

Read a specific amount of bytes.

Parameters
$length : integer
 
$pos : integer
 

readInt16()

public integer SetaPDF_Core_Reader_Binary::readInt16 ( [ integer|null $pos = null [, string $byteOrder = self::BYTE_ORDER_BIG_ENDIAN ]] )

Reads a 16-bit signed integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readInt32()

public mixed SetaPDF_Core_Reader_Binary::readInt32 ( [ integer|null $pos = null [, string $byteOrder = self::BYTE_ORDER_BIG_ENDIAN ]] )

Reads a 32-bit signed integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readInt8()

public integer SetaPDF_Core_Reader_Binary::readInt8 ( [ integer|null $pos = null ] )

Reads a 8-bit/1-byte signed integer.

Parameters
$pos : integer|null
 

readUInt16()

public integer SetaPDF_Core_Reader_Binary::readUInt16 ( [ integer|null $pos = null [, string $byteOrder = self::BYTE_ORDER_BIG_ENDIAN ]] )

Reads a 16-bit unsigned integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readUInt32()

public mixed SetaPDF_Core_Reader_Binary::readUInt32 ( [ integer|null $pos = null [, string $byteOrder = self::BYTE_ORDER_BIG_ENDIAN ]] )

Reads a 32-bit unsigned integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readUInt8()

public integer SetaPDF_Core_Reader_Binary::readUInt8 ( [ integer|null $pos = null ] )

Reads a 8-bit/1-byte unsigned integer.

Parameters
$pos : integer|null
 

reset()

public void SetaPDF_Core_Reader_Binary::reset ( integer $position, integer $length )

Reset the reader to a specific position.

Parameters
$position : integer
 
$length : integer
 

seek()

public void SetaPDF_Core_Reader_Binary::seek ( integer $position )

Seek to a position.

Parameters
$position : integer
 

skip()

public void SetaPDF_Core_Reader_Binary::skip ( integer $length )

Skip a specific byte count.

Parameters
$length : integer