Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Pdf_FileParserDataSource_File Class Reference

Public Member Functions

 __construct ($filePath)
 Object constructor.
 
 __destruct ()
 Object destructor.
 
 readBytes ($byteCount)
 Returns the specified number of raw bytes from the file at the byte offset of the current read position.
 
 readAllBytes ()
 Returns the entire contents of the file as a string.
 
 __toString ()
 Returns the full filesystem path of the file.
 
 moveToOffset ($offset)
 Seeks the file read position to the specified byte offset.
 
- Public Member Functions inherited from Zend_Pdf_FileParserDataSource
 __destruct ()
 Object destructor.
 
 readBytes ($byteCount)
 Returns the specified number of raw bytes from the data source at the byte offset of the current read position.
 
 readAllBytes ()
 Returns the entire contents of the data source as a string.
 
 __toString ()
 Returns a description of the object for debugging purposes.
 
 getOffset ()
 Returns the byte offset of the current read position within the data source.
 
 getSize ()
 Returns the total size in bytes of the data source.
 
 moveToOffset ($offset)
 Moves the current read position to the specified byte offset.
 
 skipBytes ($byteCount)
 Shifts the current read position within the data source by the specified number of bytes.
 

Protected Attributes

 $_filePath = ''
 
 $_fileResource = null
 
- Protected Attributes inherited from Zend_Pdf_FileParserDataSource
 $_size = 0
 
 $_offset = 0
 

Constructor & Destructor Documentation

__construct (   $filePath)

Object constructor.

Validates the path to the file, ensures that it is readable, then opens it for reading.

Throws an exception if the file is missing or cannot be opened.

Parameters
string$filePathFully-qualified path to the file.
Exceptions
Zend_Pdf_Exception
__destruct ( )

Object destructor.

Closes the file if it had been successfully opened.

Member Function Documentation

__toString ( )

Returns the full filesystem path of the file.

Returns
string
moveToOffset (   $offset)

Seeks the file read position to the specified byte offset.

Throws an exception if the file pointer cannot be moved or if it is moved beyond EOF (end of file).

Parameters
integer$offsetDestination byte offset.
Exceptions
Zend_Pdf_Exception
readAllBytes ( )

Returns the entire contents of the file as a string.

Preserves the current file seek position.

Returns
string
readBytes (   $byteCount)

Returns the specified number of raw bytes from the file at the byte offset of the current read position.

Advances the read position by the number of bytes read.

Throws an exception if an error was encountered while reading the file or if there is insufficient data to completely fulfill the request.

Parameters
integer$byteCountNumber of bytes to read.
Returns
string
Exceptions
Zend_Pdf_Exception

Member Data Documentation

$_filePath = ''
protected
$_fileResource = null
protected