system/io/InputStreamReader.php

Show: inherited
Table of Contents

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  

\InputStreamReader

Package: phing\system\io

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.

Parent(s)
\Reader
Children
\FileReader
Author
Hans Lellelid  
Author
Yannick Lecaillez  
Version
$Id$  

Properties

Propertyprotected\InputStream  $inStream= ''

Details
Type
\InputStream

Methods

methodpublic__construct(  $inStream ) : void

Construct a new InputStreamReader.

Parameters
Name Type Description
$inStream
methodpublicclose( ) : void

Close the stream.

Throws
Exception Description
\IOException if there is an error closing stream
methodpubliceof( ) : boolean

Whether eof has been reached with stream.

Returns
Type Description
boolean
methodpublicgetResource( ) : string

Returns string representation of attached stream.

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

Returns
Type Description
string
methodpublicmark( ) : void

Marks the current position in this input stream.

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

Throws
Exception Description
\IOException - if the underlying stream doesn't support this method.
methodpublicmarkSupported( ) : boolean

Whether the attached stream supports mark/reset.

Returns
Type Description
boolean
methodpublicread( int $len = null ) : string

Read data from file.

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

Parameters
Name Type Description
$len int

Num chars to read.

Returns
Type Description
string chars read or -1 if eof.
methodpublicreadInto(  $rBuffer ) : TRUE

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

Parameters
Name Type Description
$rBuffer
Returns
Type Description
TRUE on success. Err object on failure.
Details
Author
Charlie Killian, charlie@tizac.com  
Deprecated
Use read() or BufferedReader instead.  
methodpublicready( ) : boolean
inherited

Is stream ready for reading.

Inherited from: \Reader::ready()
Returns
Type Description
boolean
methodpublicreset( ) : void

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

Throws
Exception Description
\IOException - if the underlying stream doesn't support this method.
methodpublicskip( int $n ) : void

Skip over $n bytes.

Parameters
Name Type Description
$n int
Documentation was generated by DocBlox 0.18.1.