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 |
Definition at line 15 of file StringInputStream.class.php.
StringInputStream::__construct | ( | $ | string | ) |
Definition at line 23 of file StringInputStream.class.php.
References $string, and Assert::isString().
StringInputStream::close | ( | ) |
Reimplemented from InputStream.
Definition at line 72 of file StringInputStream.class.php.
static StringInputStream::create | ( | $ | string | ) | [static] |
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 | ( | ) |
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().
StringInputStream::reset | ( | ) |
Reimplemented from InputStream.
Definition at line 62 of file StringInputStream.class.php.
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().