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)
object
The reader (e.g. FileReader).
integer
The 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.
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.
string
mark()
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() |
---|
boolean
open()
read(int $len) : mixed
If length is specified, then only that number of chars is read, otherwise stream is read until EOF.
int
Number of bytes to read. Default is to read configured buffer size number of bytes.
mixed
buffer or -1 if EOF.readChar() : string
string
single char or -1 if EOF.readLine()
ready() : boolean
inherited_from | \Reader::ready() |
---|
boolean
reset()
skip(int $n)
int
$buffer
$bufferPos
$bufferSize
$in