SetaPDF_Core_Reader_ReaderInterface Interface of a reader implementation

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

Implemented in

Summary

Methods

addOffset()

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

Adds an offset to the current offset.

Parameters
$offset : integer
 

cleanUp()

abstract public SetaPDF_Core_Reader_ReaderInterface::cleanUp (
void
): void

Method which is called when a document is cleaned up.

copyTo()

Copies the complete content to the writer.

Parameters
$writer : SetaPDF_Core_WriteInterface
 

ensure()

abstract public SetaPDF_Core_Reader_ReaderInterface::ensure (
int $pos, int $length
): void

Ensures bytes in the buffer with a specific length and location in the file.

Parameters
$pos : int
 
$length : int
 
See

ensureContent()

abstract public SetaPDF_Core_Reader_ReaderInterface::ensureContent (
void
): boolean

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

getBuffer()

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

Returns the current buffer.

Parameters
$atOffset : boolean
 

getByte()

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

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

Parameters
$pos : int
 

getLength()

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

Returns the byte length of the buffer.

Parameters
$atOffset : boolean
 

getOffset()

abstract public SetaPDF_Core_Reader_ReaderInterface::getOffset (
void
): integer

Returns the current offset of the current position.

getPos()

abstract public SetaPDF_Core_Reader_ReaderInterface::getPos (
void
): int

Gets the current position of the pointer.

getTotalLength()

Gets the total available length.

increaseLength()

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

Forcefully read more data into the buffer.

Parameters
$minLength : int
 

readByte()

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

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 SetaPDF_Core_Reader_ReaderInterface::readBytes (
integer $length [, integer $pos = null ]
): string|boolean

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 SetaPDF_Core_Reader_ReaderInterface::readLine (
[ int $length = 1024 ]
): string|false

Reads a line from the current buffer.

Parameters
$length : int
 

reset()

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

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

Parameters
$pos : int|null
 
$length : int
 

setOffset()

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

Sets the offset of the current position.

Parameters
$offset : int