InputStreamReader

Extends \Reader

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

Methods

Construct a new InputStreamReader.

__construct(\InputStream $inStream) 

Arguments

$inStream

\InputStream

Close stream.

close() 
inherited abstract
throws

if there is an error closing stream

Move stream position relative to current pos.

skip(int $n) 
inherited

Arguments

$n

int

Read data from source.

read(int $len = null) 
inherited abstract

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

Arguments

$len

int

If supported, places a "marker" (like a bookmark) at current stream position.

mark() 
inherited

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

Whether marking is supported.

markSupported() : boolean
inherited

Response

boolean

Reset the current position in stream to beginning or last mark (if supported).

reset() 
inherited

Whether eof has been reached with stream.

eof() : boolean

Response

boolean

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.

Arguments

$rBuffer

Response

TRUE

on success. Err object on failure.

Returns the filename, url, etc. that is being read from.

getResource() : string
inherited abstract

This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.

Response

string

Is stream ready for reading.

ready() : boolean
inherited

Response

boolean

Properties

inStream

inStream : \InputStream
var

Type(s)

\InputStream