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 |
Definition at line 15 of file FileInputStream.class.php.
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().
FileInputStream::close | ( | ) |
Reimplemented from InputStream.
Definition at line 104 of file FileInputStream.class.php.
Referenced by __destruct().
static FileInputStream::create | ( | $ | nameOrFd | ) | [static] |
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 | ( | ) |
Reimplemented from InputStream.
Definition at line 63 of file FileInputStream.class.php.
References getOffset().
Referenced by reset().
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().
FileInputStream::readString | ( | $ | length = null |
) |
Definition at line 117 of file FileInputStream.class.php.
References realRead().
FileInputStream::realRead | ( | $ | length, | |
$ | string = false | |||
) |
Definition at line 122 of file FileInputStream.class.php.
Referenced by read(), and readString().
FileInputStream::reset | ( | ) |
Reimplemented from InputStream.
Definition at line 83 of file FileInputStream.class.php.
References mark(), and seek().
FileInputStream::seek | ( | $ | offset | ) |
Definition at line 91 of file FileInputStream.class.php.
Referenced by reset().
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.