classes/phing/system/io/Reader.php

Abstract class for reading character streams.

author
Hans Lellelid
author
Yannick Lecaillez
package
phing.system.io
version
$Revision: 552 $

\Reader

Abstract class for reading character streams.

author
Hans Lellelid
author
Yannick Lecaillez
package
phing.system.io
version
$Revision: 552 $

Methods

methodpublic  close( ) :
abstractClose stream.
Details
throws
if there is an error closing stream
methodpublic  getResource( ) : string
abstractReturns the filename, url, etc. 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
Type Description
string
methodpublic  mark( ) :
If supported, places a "marker" (like a bookmark) at current stream position.

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

methodpublic  markSupported( ) : boolean
Whether marking is supported.
Returns
Type Description
boolean
methodpublic  read( int $len = null ) :
abstractRead data from source.

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

Parameters
Name Type Description
$len int
methodpublic  ready( ) : boolean
Is stream ready for reading.
Returns
Type Description
boolean
methodpublic  reset( ) :
Reset the current position in stream to beginning or last mark (if supported).
methodpublic  skip( int $n ) :
Move stream position relative to current pos.
Parameters
Name Type Description
$n int
Documentation was generated by DocBlox 0.13.1.