setasign\SetaPDF2\Core\Reader

ReaderInterface Interface of a reader implementation

File: /SetaPDF v2/Core/Reader/ReaderInterface.php
Old class name (alias): \SetaPDF_Core_Reader_ReaderInterface

Implemented in

Summary

Methods

addOffset()

abstract public ReaderInterface::addOffset (
int $offset
): void

Adds an offset to the current offset.

Parameters
$offset : int
 

cleanUp()

abstract public ReaderInterface::cleanUp (
void
): void

Method which is called when a document is cleaned up.

copyTo()

abstract public ReaderInterface::copyTo (): void

Copies the complete content to the writer.

Parameters
$writer : \SetaPDF_Core_WriteInterface
 

ensure()

abstract public 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 ReaderInterface::ensureContent (
void
): bool

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

getBuffer()

abstract public ReaderInterface::getBuffer (
bool $atOffset = true
): string

Returns the current buffer.

Parameters
$atOffset : bool
 

getByte()

abstract public ReaderInterface::getByte (
int $pos = null
): string|bool

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

Parameters
$pos : int
 

getLength()

abstract public ReaderInterface::getLength (
bool $atOffset = false
): int

Returns the byte length of the buffer.

Parameters
$atOffset : bool
 

getOffset()

abstract public ReaderInterface::getOffset (
void
): int

Returns the current offset of the current position.

getPos()

abstract public ReaderInterface::getPos (
void
): int

Gets the current position of the pointer.

getTotalLength()

abstract public ReaderInterface::getTotalLength (
void
): int

Gets the total available length.

increaseLength()

abstract public ReaderInterface::increaseLength (
int $minLength = 100
): void

Forcefully read more data into the buffer.

Parameters
$minLength : int
 

readByte()

abstract public ReaderInterface::readByte (
int $pos = null
): string|bool

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

Parameters
$pos : int
 

readBytes()

abstract public ReaderInterface::readBytes (
int $length,
int $pos = null
): string|bool

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 : int
 
$pos : int
 

readLine()

abstract public ReaderInterface::readLine (
int $length = 1024
): string|false

Reads a line from the current buffer.

Parameters
$length : int
 

reset()

abstract public ReaderInterface::reset (
?int $pos = 0,
int $length = 100
): void

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

Parameters
$pos : ?int
 
$length : int
 

setOffset()

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

Sets the offset of the current position.

Parameters
$offset : int