Convenience class for reading files.
author | |
---|---|
version |
$Id$ |
access |
public |
see | |
package |
phing.system.io |
__construct(object $reader, integer $buffsize = 65536)
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.
read(int $len = null)
If length is specified, then only that number of chars is read, otherwise stream is read until EOF.
int
skip(int $n)
int
reset()
close()
throws |
if there is an error closing stream |
---|
open()
readLine()
readChar() : string
string
single char or -1 if EOF.
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
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).
markSupported() : boolean
boolean
ready() : boolean
boolean
bufferSize :
buffer :
bufferPos :
in :