Convenience class for reading files.
Unlike the Java counterpart, this class does not (yet) handle character set transformations. This will be an important function of this class with move to supporting PHP6.
package | phing.system.io |
---|---|
author | Hans Lellelid |
author | Yannick Lecaillez |
version | $Id$ |
__construct(mixed $file)
mixed
PhingFile or string pathname.
close()
inherited_from | \InputStreamReader::close() |
---|
\IOException |
if there is an error closing stream |
---|
eof() : boolean
inherited_from | \InputStreamReader::eof() |
---|
boolean
getResource() : string
that is being read from. This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.
inherited_from | \InputStreamReader::getResource() |
---|
string
mark()
A subsequent call to reset() will move stream position back to last marker (if supported).
inherited_from | \InputStreamReader::mark() |
---|
\IOException |
- if the underlying stream doesn't support this method. |
---|
markSupported() : boolean
inherited_from | \InputStreamReader::markSupported() |
---|
boolean
read(int $len) : string
If length is specified, then only that number of chars is read, otherwise stream is read until EOF.
inherited_from | \InputStreamReader::read() |
---|
int
Num chars to read.
string
chars read or -1 if eof.readInto($rBuffer) : TRUE
author | Charlie Killian, charlie@tizac.com |
---|---|
inherited_from | \InputStreamReader::readInto() |
TRUE
on success. Err object on failure.ready() : boolean
inherited_from | \Reader::ready() |
---|---|
inherited_from | \InputStreamReader::ready() |
boolean
reset()
inherited_from | \InputStreamReader::reset() |
---|
\IOException |
- if the underlying stream doesn't support this method. |
---|
skip(int $n)
inherited_from | \InputStreamReader::skip() |
---|
int