Writer class for OutputStream objects.

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$

 Methods

Construct a new InputStreamReader.

__construct(\InputStream $inStream) 

Parameters

$inStream

Close the stream.

close() 

Exceptions

\IOException if there is an error closing stream

Whether eof has been reached with stream.

eof() : boolean

Returns

boolean

Returns string representation of attached stream.

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.

Returns

string

Marks the current position in this input stream.

mark() 

A subsequent call to reset() will move stream position back to last marker (if supported).

Exceptions

\IOException - if the underlying stream doesn't support this method.

Whether the attached stream supports mark/reset.

markSupported() : boolean

Returns

boolean

Read data from file.

read(int $len) : string

If length is specified, then only that number of chars is read, otherwise stream is read until EOF.

Parameters

$len

int

Num chars to read.

Returns

stringchars read or -1 if eof.

Reads a entire file and stores the data in the variable passed by reference.

readInto($rBuffer) : TRUE
author Charlie Killian, charlie@tizac.com
deprecated Use read() or BufferedReader instead.

Parameters

$rBuffer

Returns

TRUEon success. Err object on failure.

Is stream ready for reading.

ready() : boolean
Inherited
inherited_from \Reader::ready()

Returns

boolean

Repositions this stream to the position at the time the mark method was last called on this input stream.

reset() 

Exceptions

\IOException - if the underlying stream doesn't support this method.

Skip over $n bytes.

skip(int $n) 

Parameters

$n

int

 Properties

 

$inStream : \InputStream