SetaPDF_Core_Reader_ReaderInterface Interface of a reader implementation

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

Implemented in

Summary

Methods

addOffset()

abstract public void SetaPDF_Core_Reader_ReaderInterface::addOffset ( integer $offset )

Adds an offset to the current offset.

Parameters
$offset : integer
 

cleanUp()

abstract public void SetaPDF_Core_Reader_ReaderInterface::cleanUp ( void )

Method which is called when a document is cleaned up.

copyTo()

abstract public void SetaPDF_Core_Reader_ReaderInterface::copyTo ( SetaPDF_Core_WriteInterface $writer )

Copies the complete content to the writer.

Parameters
$writer : SetaPDF_Core_WriteInterface
 

ensureContent()

abstract public boolean SetaPDF_Core_Reader_ReaderInterface::ensureContent ( void )

Make sure that there is at least one character beyond the current offset in the buffer.

getBuffer()

abstract public string SetaPDF_Core_Reader_ReaderInterface::getBuffer ( [ boolean $atOffset = true ] )

Returns the current buffer.

Parameters
$atOffset : boolean
 

getByte()

abstract public string SetaPDF_Core_Reader_ReaderInterface::getByte ( [ int $pos = null ] )

Get the byte at the current or at a specific offset position.

Parameters
$pos : int
 

getLength()

abstract public int SetaPDF_Core_Reader_ReaderInterface::getLength ( [ boolean $atOffset = false ] )

Returns the byte length of the buffer.

Parameters
$atOffset : boolean
 

getOffset()

abstract public integer SetaPDF_Core_Reader_ReaderInterface::getOffset ( void )

Returns the current offset of the current position.

getPos()

abstract public int SetaPDF_Core_Reader_ReaderInterface::getPos ( void )

Gets the current position of the pointer.

getTotalLength()

abstract public int SetaPDF_Core_Reader_ReaderInterface::getTotalLength ( void )

Gets the total available length.

increaseLength()

abstract public void SetaPDF_Core_Reader_ReaderInterface::increaseLength ( [ int $minLength = 100 ] )

Forcefully read more data into the buffer.

Parameters
$minLength : int
 

readByte()

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

Get the byte at the current or at a specific offset position and sets the internal pointer to the next byte.

Parameters
$pos : integer
 

readBytes()

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

Get a specific byte count from the current or at a specific offset position and set the internal pointer to the next byte.

Parameters
$length : integer
 
$pos : integer
 

readLine()

abstract public string SetaPDF_Core_Reader_ReaderInterface::readLine ( [ int $length = 1024 ] )

Reads a line from the current buffer.

Parameters
$length : int
 

reset()

abstract public void SetaPDF_Core_Reader_ReaderInterface::reset ( [ int|null $pos = 0 [, int $length = 100 ]] )

Resets the buffer to a specific position and reread the buffer with the given length.

Parameters
$pos : int|null
 
$length : int
 

setOffset()

abstract public void SetaPDF_Core_Reader_ReaderInterface::setOffset ( int $offset )

Sets the offset of the current position.

Parameters
$offset : int