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

Class: InputStream

Source Location: /system/io/InputStream.php

Class Overview


Wrapper class for PHP stream that supports read operations.


Variables

Methods


Child classes:

FileInputStream
Input stream subclass for file streams.

Class Details

[line 27]
Wrapper class for PHP stream that supports read operations.



[ Top ]


Class Variables

$currentPosition =  0

[line 37]



Tags:

var:  Position of stream cursor.
access:  protected

Type:   int


[ Top ]

$mark =  0

[line 42]



Tags:

var:  Marked position of stream cursor.
access:  protected

Type:   int


[ Top ]

$stream =

[line 32]



Tags:

var:  The attached PHP stream.
access:  protected

Type:   resource


[ Top ]



Class Methods


constructor __construct [line 48]

InputStream __construct( resource $stream)

Construct a new InputStream.



Tags:

access:  public


Overridden in child classes as:

FileInputStream::__construct()
Construct a new FileInputStream.

Parameters:

resource   $stream   Configured PHP stream for writing.

[ Top ]

method close [line 137]

void close( )

Closes stream.



Tags:

throws:  IOException if stream cannot be closed (note that calling close() on an already-closed stream will not raise an exception)
access:  public


[ Top ]

method eof [line 153]

boolean eof( )

Whether eof has been reached with stream.



Tags:

access:  public


[ Top ]

method mark [line 105]

void mark( )

Marks the current position in this input stream.



Tags:

throws:  IOException - if the underlying stream doesn't support this method.
access:  public


[ Top ]

method markSupported [line 116]

boolean markSupported( )

Whether the input stream supports mark and reset methods.



Tags:

access:  public


Overridden in child classes as:

FileInputStream::markSupported()
Mark is supported by FileInputStream.

[ Top ]

method read [line 81]

string read( [int $len = null])

Read data from stream until $len chars or EOF.



Tags:

return:  chars read or -1 if eof.
access:  public


Parameters:

int   $len   Num chars to read. If not specified this stream will read until EOF.

[ Top ]

method readInto [line 166]

TRUE readInto( string &$rBuffer)

Reads a entire until EOF and places contents in passed-in variable. Stream is closed after read.



Tags:

return:  on success.
author:  Charlie Killian, charlie@tizac.com
deprecated:  - Instead, use the read() method or a BufferedReader.
throws:  IOException - if there is an error reading from stream.
access:  public


Parameters:

string   &$rBuffer   String variable where read contents will be put.

[ Top ]

method reset [line 124]

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.


[ Top ]

method skip [line 59]

void skip( int $n)

Skip over $n bytes.



Tags:

access:  public


Parameters:

int   $n  

[ Top ]

method __toString [line 175]

string __toString( )

Returns string representation of attached stream.



Tags:

access:  public


Overridden in child classes as:

FileInputStream::__toString()
Returns a string representation of the attached file.

[ Top ]


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