Convenience class for reading files.
| author | <a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a> |
|---|---|
| version | $Id$ |
| access | public |
| see | \global\FilterReader |
| package | phing.system.io |
__construct(\Reader $reader, integer $buffsize)
objectThe reader (e.g. FileReader).
integerThe size of the buffer we should use for reading files. A large buffer ensures that most files (all scripts?) are parsed in 1 buffer.
eof() : boolean
This is important, because filters may want to know if the end of the file (and not just buffer) has been reached.
booleangetResource() : 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.
stringmark()
A subsequent call to reset() will move stream position back to last marker (if supported).
| inherited_from | \Reader::mark() |
|---|
markSupported() : boolean
| inherited_from | \Reader::markSupported() |
|---|
booleanopen()
read(int $len) : mixed
If length is specified, then only that number of chars is read, otherwise stream is read until EOF.
intNumber of bytes to read. Default is to read configured buffer size number of bytes.
mixedbuffer or -1 if EOF.readChar() : string
stringsingle char or -1 if EOF.readLine()
ready() : boolean
| inherited_from | \Reader::ready() |
|---|
booleanreset()
skip(int $n)
int
$buffer
$bufferPos
$bufferSize
$in