Public Member Functions | Static Public Member Functions | Private Attributes

FileInputStream Class Reference
[Various accompanying utilities]

Inheritance diagram for FileInputStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($nameOrFd)
 __destruct ()
 isEof ()
 mark ()
 getOffset ()
 markSupported ()
 reset ()
 seek ($offset)
 close ()
 read ($length)
 reads a maximum of $length bytes
 readString ($length=null)
 realRead ($length, $string=false)

Static Public Member Functions

static create ($nameOrFd)

Private Attributes

 $fd = null
 $mark = null

Detailed Description

Definition at line 15 of file FileInputStream.class.php.


Constructor & Destructor Documentation

FileInputStream::__construct ( nameOrFd  ) 

Definition at line 21 of file FileInputStream.class.php.

FileInputStream::__destruct (  ) 

Definition at line 38 of file FileInputStream.class.php.

References close().

Here is the call graph for this function:


Member Function Documentation

FileInputStream::close (  ) 
Returns:
FileInputStream

Reimplemented from InputStream.

Definition at line 104 of file FileInputStream.class.php.

Referenced by __destruct().

static FileInputStream::create ( nameOrFd  )  [static]
Returns:
FileInputStream

Definition at line 50 of file FileInputStream.class.php.

FileInputStream::getOffset (  ) 

Definition at line 70 of file FileInputStream.class.php.

Referenced by mark().

FileInputStream::isEof (  ) 

Reimplemented from InputStream.

Definition at line 55 of file FileInputStream.class.php.

FileInputStream::mark (  ) 
Returns:
FileInputStream

Reimplemented from InputStream.

Definition at line 63 of file FileInputStream.class.php.

References getOffset().

Referenced by reset().

Here is the call graph for this function:

FileInputStream::markSupported (  ) 

Reimplemented from InputStream.

Definition at line 75 of file FileInputStream.class.php.

FileInputStream::read ( length  ) 

reads a maximum of $length bytes

returns null on eof or if length == 0. Otherwise MUST return at least one byte or throw IOException

NOTE: if length is too large to read all data at once and eof has not been reached, it MUST BLOCK until all data is read or eof is reached or throw IOException.

It is abnormal state. Maybe you should use some kind of non-blocking channels instead?

Reimplemented from InputStream.

Definition at line 112 of file FileInputStream.class.php.

References realRead().

Here is the call graph for this function:

FileInputStream::readString ( length = null  ) 

Definition at line 117 of file FileInputStream.class.php.

References realRead().

Here is the call graph for this function:

FileInputStream::realRead ( length,
string = false 
)

Definition at line 122 of file FileInputStream.class.php.

Referenced by read(), and readString().

FileInputStream::reset (  ) 
Returns:
FileInputStream

Reimplemented from InputStream.

Definition at line 83 of file FileInputStream.class.php.

References mark(), and seek().

Here is the call graph for this function:

FileInputStream::seek ( offset  ) 
Returns:
FileInputStream

Definition at line 91 of file FileInputStream.class.php.

Referenced by reset().


Member Data Documentation

FileInputStream::$fd = null [private]

Definition at line 17 of file FileInputStream.class.php.

FileInputStream::$mark = null [private]

Definition at line 19 of file FileInputStream.class.php.


The documentation for this class was generated from the following file: