# system/io/BufferedWriter.php

Convenience class for writing files.

Author
  Hans Lellelid
Package
  phing.system.io
Version
  $Revision: 552 $

## \BufferedWriter
jump to top

Package: phing\system\io

Convenience class for writing files.

Parent(s)
  \Writer
Author
  Hans Lellelid
Version
  $Revision: 552 $

### Properties

`$bufferSize= '0'`

The size of the buffer in kb.

Default value `0` Details

Type

`\Writer $out= ''`

The Writer we are buffering output to.
Details

Type
  \Writer

### Methods

`__construct( $writer, $buffsize = 8192 ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$writer |  |
$buffsize |  |

`close( ) : void`

Close attached stream.

Throws

Exception | Description
--- | ---
\IOException | - if there is an error closing stream.

`flush( ) : void`

Flush the stream, if supported by the stream.

`getResource( ) : string`

Returns a string representation of resource filename, url, etc. that is being written to.

Returns

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

`newLine( ) : void`

`write( string $buf, int $off = null, int $len = null ) : void`

Writes data to output stream.

Parameters

Name | Type | Description
--- | --- | ---
$buf | string |
$off | int |
$len | int |

Documentation was generated by DocBlox 0.15.1.