phing-system-io

# Class: InputStreamReader Source Location: /system/io/InputStreamReader.php
### Class Overview
    Reader
       |
       --InputStreamReader
Writer class for OutputStream objects. #### Author(s): Yannick Lecaillez <yl@seasonfive.com> Hans Lellelid <hans@xmpl.org> #### Version: $Revision: 552 $ | ### Variables $inStream | ### Methods __construct close eof getResource mark markSupported read readInto reset skip
### Child classes: FileReader Convenience class for reading files. | ### Inherited Methods #### Class: Reader Reader::close() Close stream. Reader::getResource() Returns the filename, url, etc. that is being read from. Reader::mark() If supported, places a "marker" (like a bookmark) at current stream position. Reader::markSupported() Whether marking is supported. Reader::read() Read data from source. Reader::ready() Is stream ready for reading. Reader::reset() Reset the current position in stream to beginning or last mark (if supported). Reader::skip() Move stream position relative to current pos.
### Class Details [line 34] 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. #### Tags:
author: | Yannick Lecaillez <yl@seasonfive.com>
author: | Hans Lellelid <hans@xmpl.org>
version: | $Revision: 552 $
[ Top ] ### Class Variables #### $inStream = [line 39] #### Tags:
access: | protected
Type: | InputStream
[ Top ] ### Class Methods ### constructor __construct [line 45]
`InputStreamReader __construct( InputStream $inStream, InputStream $$inStream)`
Construct a new InputStreamReader. #### Tags:
access: | public
Overridden in child classes as: FileReader::__construct() Construct a new FileReader. #### Parameters:
InputStream | $$inStream | InputStream to read from
InputStream | $inStream |
[ Top ] ### method close [line 52]
`void close( )`
Close the stream. #### Tags:
access: | public
Overrides Reader::close() (Close stream.) [ Top ] ### method eof [line 101]
`boolean eof( )`
Whether eof has been reached with stream. #### Tags:
access: | public
[ Top ] ### method getResource [line 124]
`string getResource( )`
Returns string representation of attached stream. #### Tags:
access: | public
Overrides Reader::getResource() (Returns the filename, url, etc. that is being read from.) [ Top ] ### method mark [line 77]
`void mark( )`
Marks the current position in this input stream. #### Tags:
throws: | IOException - if the underlying stream doesn't support this method.
access: | public
Overrides Reader::mark() (If supported, places a "marker" (like a bookmark) at current stream position.) [ Top ] ### method markSupported [line 85]
`boolean markSupported( )`
Whether the attached stream supports mark/reset. #### Tags:
access: | public
Overrides Reader::markSupported() (Whether marking is supported.) [ Top ] ### method read [line 69]
`string read( [int $len = null])`
Read data from file. #### Tags:
return: | chars read or -1 if eof.
access: | public
Overrides Reader::read() (Read data from source.) #### Parameters:
int | $len | Num chars to read.
[ Top ] ### method readInto [line 116]
`TRUE readInto( object &$rBuffer, string $file)`
Reads a entire file and stores the data in the variable passed by reference. #### Tags:
return: | on success. Err object on failure.
author: | Charlie Killian, charlie@tizac.com
deprecated: | Use read() or BufferedReader instead.
access: | public
#### Parameters:
string | $file | String. Path and/or name of file to read.
object | &$rBuffer | Reference. Variable of where to put contents.
[ Top ] ### method reset [line 93]
`void reset( )`
Repositions this stream to the position at the time the mark method was last called on this input stream. #### Tags:
throws: | IOException - if the underlying stream doesn't support this method.
access: | public
Overrides Reader::reset() (Reset the current position in stream to beginning or last mark (if supported).) [ Top ] ### method skip [line 60]
`void skip( int $n)`
Skip over $n bytes. #### Tags:
access: | public
Overrides Reader::skip() (Move stream position relative to current pos.) #### Parameters:
int | $n |
[ Top ] Documentation generated on Mon, 19 Oct 2009 10:51:07 +0200 by phpDocumentor 1.4.3