SetaPDF_Core_Reader_Binary Class representing a binary reader

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

Class hierarchy

Summary

Constants

BYTE_ORDER_BIG_ENDIAN

const string SetaPDF_Core_Reader_Binary::BYTE_ORDER_BIG_ENDIAN = 'bigEndian'

Big endian byte order

BYTE_ORDER_LITTLE_ENDIAN

const string SetaPDF_Core_Reader_Binary::BYTE_ORDER_LITTLE_ENDIAN = 'littleEndian'

Little endian byte order


Properties

$_reader

protected SetaPDF_Core_Reader_ReaderInterface SetaPDF_Core_Reader_Binary::$_reader

The main reader instance


Methods

__construct()

cleanUp()

public SetaPDF_Core_Reader_Binary::cleanUp (
void
): void

Release resources/cycled references.

getReader()

readByte()

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

Read a single byte.

Parameters
$pos : integer
 

readBytes()

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

Read a specific amount of bytes.

Parameters
$length : integer
 
$pos : integer
 

readInt16()

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

Reads a 16-bit signed integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readInt32()

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

Reads a 32-bit signed integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readInt8()

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

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

Parameters
$pos : integer|null
 

readUInt16()

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

Reads a 16-bit unsigned integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readUInt32()

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

Reads a 32-bit unsigned integer.

Parameters
$pos : integer|null
 
$byteOrder : string
 

readUInt8()

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

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

Parameters
$pos : integer|null
 

reset()

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

Reset the reader to a specific position.

Parameters
$position : integer
 
$length : integer
 

seek()

public SetaPDF_Core_Reader_Binary::seek (
integer $position
): void

Seek to a position.

Parameters
$position : integer
 

skip()

public SetaPDF_Core_Reader_Binary::skip (
integer $length
): void

Skip a specific byte count.

Parameters
$length : integer