phing-system-io
[ class tree: phing-system-io ] [ index: phing-system-io ] [ all elements ]

Class: Reader

Source Location: /system/io/Reader.php

Class Overview


Abstract class for reading character streams.


Author(s):

Version:

  • $Revision: 552 $

Methods


Child classes:

BufferedReader
Convenience class for reading files.
InputStreamReader
Writer class for OutputStream objects.
FilterReader
Wrapper class for readers, which can be used to apply filters.
StringReader
Dummy class for reading from string of characters.
ConsoleReader
Convenience class for reading console input.

Class Details

[line 30]
Abstract class for reading character streams.



Tags:

author:  Yannick Lecaillez <yl@seasonfive.com>
author:  Hans Lellelid <hans@xmpl.org>
version:  $Revision: 552 $
abstract:  


[ Top ]


Class Methods


method close [line 46]

void close( )

Close stream.



Tags:

abstract:  
throws:  IOException if there is an error closing stream
access:  public


Overridden in child classes as:

BufferedReader::close()
InputStreamReader::close()
Close the stream.
FilterReader::close()
StringReader::close()
ConsoleReader::close()

[ Top ]

method getResource [line 54]

string getResource( )

Returns 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.




Tags:

abstract:  


Overridden in child classes as:

BufferedReader::getResource()
InputStreamReader::getResource()
Returns string representation of attached stream.
FilterReader::getResource()
StringReader::getResource()
ConsoleReader::getResource()
Returns path to file we are reading.

[ Top ]

method mark [line 72]

void 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).




Tags:

access:  public


Overridden in child classes as:

InputStreamReader::mark()
Marks the current position in this input stream.
StringReader::mark()

[ Top ]

method markSupported [line 78]

boolean markSupported( )

Whether marking is supported.



Tags:

access:  public


Overridden in child classes as:

InputStreamReader::markSupported()
Whether the attached stream supports mark/reset.
StringReader::markSupported()

[ Top ]

method read [line 40]

void read( [int $len = null])

Read data from source.

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




Tags:

abstract:  
access:  public


Overridden in child classes as:

BufferedReader::read()
Reads and returns a chunk of data.
InputStreamReader::read()
Read data from file.
FilterReader::read()
Read data from source.
BaseFilterReader::read()
Reads characters.
StripPhpComments::read()
Returns the stream without Php comments.
ExpandProperties::read()
Returns the filtered stream.
XincludeFilter::read()
Reads stream, applies XSLT and returns resulting stream.
TailFilter::read()
Returns the last n lines of a file.
TranslateGettext::read()
Returns the filtered stream.
TabToSpaces::read()
Returns stream after converting tabs to the specified number of spaces.
LineContainsRegexp::read()
Returns all lines in a buffer that contain specified strings.
HeadFilter::read()
Returns first n lines of stream.
LineContains::read()
Returns all lines in a buffer that contain specified strings.
ReplaceTokensWithFile::read()
Returns stream with tokens having been replaced with appropriate values.
StripLineComments::read()
Returns stream only including lines from the original stream which don't start with any of the specified comment prefixes.
PrefixLines::read()
Adds a prefix to each line of input stream and returns resulting stream.
StripLineBreaks::read()
Returns the filtered stream, only including characters not in the set of line-breaking characters.
XsltFilter::read()
Reads stream, applies XSLT and returns resulting stream.
ReplaceTokens::read()
Returns stream with tokens having been replaced with appropriate values.
TidyFilter::read()
Reads input and returns Tidy-filtered output.
StripWhitespace::read()
Returns the stream without Php comments and whitespace.
ReplaceRegexp::read()
Returns the filtered stream.
StringReader::read()
ConsoleReader::read()

Parameters:

int   $len  

[ Top ]

method ready [line 86]

boolean ready( )

Is stream ready for reading.



Tags:

access:  public


Overridden in child classes as:

StringReader::ready()

[ Top ]

method reset [line 65]

void reset( )

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



Tags:

access:  public


Overridden in child classes as:

BufferedReader::reset()
InputStreamReader::reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
FilterReader::reset()
StringReader::reset()

[ Top ]

method skip [line 60]

void skip( int $n)

Move stream position relative to current pos.



Tags:

access:  public


Overridden in child classes as:

BufferedReader::skip()
InputStreamReader::skip()
Skip over $n bytes.
FilterReader::skip()
StringReader::skip()

Parameters:

int   $n  

[ Top ]


Documentation generated on Mon, 19 Oct 2009 10:51:51 +0200 by phpDocumentor 1.4.3