classes/phing/system/io/InputStream.php
Wrapper class for PHP stream that supports read operations.
- package
- phing.system.io
\InputStream
Wrapper class for PHP stream that supports read operations.
- package
- phing.system.io
Properties
Methods

__construct(
resource $stream
)
:
Construct a new InputStream.
| Name | Type | Description |
|---|---|---|
| $stream | resource | Configured PHP stream for writing. |

__toString(
)
:
stringReturns string representation of attached stream.
| Type | Description |
|---|---|
| string |

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

mark(
)
:
Marks the current position in this input stream.
- throws
- - if the underlying stream doesn't support this method.

markSupported(
)
:
booleanWhether the input stream supports mark and reset methods.
| Type | Description |
|---|---|
| boolean |

read(
int $len
=
null
)
:
stringRead data from stream until $len chars or EOF.
| Name | Type | Description |
|---|---|---|
| $len | int | Num chars to read. If not specified this stream will read until EOF. |
| Type | Description |
|---|---|
| string |

readInto(
string $rBuffer
)
:
TRUEReads a entire until EOF and places contents in passed-in variable. Stream is closed after read.
| Name | Type | Description |
|---|---|---|
| $rBuffer | string | &$rBuffer String variable where read contents will be put. |
| Type | Description |
|---|---|
| TRUE |
- author
- Charlie Killian, charlie@tizac.com
- deprecated
- - Instead, use the read() method or a BufferedReader.
- throws
- - if there is an error reading from stream.

reset(
)
:
Repositions this stream to the position at the time the mark method was last called on this input stream.
- throws
- - if the underlying stream doesn't support this method.