# classes/phing/system/io/OutputStream.php

Wrapper class for PHP stream that supports write operations.

package
  phing.system.io

## \OutputStream
jump to top

Wrapper class for PHP stream that supports write operations.

package
  phing.system.io

### Properties

`resource $stream= ''`

The configured PHP stream.
Details

Type
  resource

### Methods

`__construct( resource $stream ) :`
Construct a new OutputStream.
Parameters

Name | Type | Description
--- | --- | ---
$stream | resource | Configured PHP stream for writing.

`__toString( ) : string`
Returns a string representation of the attached PHP stream.
Returns

Type | Description
--- | ---
string |

`close( ) : void`
Closes attached stream, flushing output first.
Details

throws
  if cannot close stream (note that attempting to close an already closed stream will not raise an IOException)

`flush( ) :`
Flushes stream.
Details

throws
  if unable to flush data (e.g. stream is not open).

`write( string $buf, int $off = null, int $len = null ) : void`
Writes data to stream.
Parameters

Name | Type | Description
--- | --- | ---
$buf | string | Binary/character data to write.
$off | int | (Optional) offset.
$len | int | (Optional) number of bytes/chars to write.

Details

throws
  - if there is an error writing to stream

Documentation was generated by DocBlox 0.13.1.