Public Member Functions | Static Public Member Functions | Private Attributes

StringInputStream Class Reference
[Various accompanying utilities]

Inheritance diagram for StringInputStream:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($string)
 isEof ()
 mark ()
 markSupported ()
 reset ()
 close ()
 read ($count)
 reads a maximum of $length bytes

Static Public Member Functions

static create ($string)

Private Attributes

 $string = null
 $length = null
 $position = 0
 $mark = 0

Detailed Description

Definition at line 15 of file StringInputStream.class.php.


Constructor & Destructor Documentation

StringInputStream::__construct ( string  ) 

Definition at line 23 of file StringInputStream.class.php.

References $string, and Assert::isString().

Here is the call graph for this function:


Member Function Documentation

StringInputStream::close (  ) 
Returns:
StringInputStream

Reimplemented from InputStream.

Definition at line 72 of file StringInputStream.class.php.

static StringInputStream::create ( string  )  [static]
Returns:
StringInputStream

Definition at line 34 of file StringInputStream.class.php.

References $string.

Referenced by OpenIdCredentials::parseHTML().

StringInputStream::isEof (  ) 

Reimplemented from InputStream.

Definition at line 39 of file StringInputStream.class.php.

Referenced by read().

StringInputStream::mark (  ) 
Returns:
StringInputStream

Reimplemented from InputStream.

Definition at line 47 of file StringInputStream.class.php.

StringInputStream::markSupported (  ) 

Reimplemented from InputStream.

Definition at line 54 of file StringInputStream.class.php.

StringInputStream::read ( length  ) 

reads a maximum of $length bytes

returns null on eof or if length == 0. Otherwise MUST return at least one byte or throw IOException

NOTE: if length is too large to read all data at once and eof has not been reached, it MUST BLOCK until all data is read or eof is reached or throw IOException.

It is abnormal state. Maybe you should use some kind of non-blocking channels instead?

Reimplemented from InputStream.

Definition at line 79 of file StringInputStream.class.php.

References isEof().

Here is the call graph for this function:

StringInputStream::reset (  ) 
Returns:
StringInputStream

Reimplemented from InputStream.

Definition at line 62 of file StringInputStream.class.php.


Member Data Documentation

StringInputStream::$length = null [private]

Definition at line 18 of file StringInputStream.class.php.

StringInputStream::$mark = 0 [private]

Definition at line 21 of file StringInputStream.class.php.

StringInputStream::$position = 0 [private]

Definition at line 20 of file StringInputStream.class.php.

StringInputStream::$string = null [private]

Definition at line 17 of file StringInputStream.class.php.

Referenced by __construct(), and create().


The documentation for this class was generated from the following file: