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

Convenience class for reading files.

access
  public
author
  Yannick Lecaillez
package
  phing.system.io
see
  \FilterReader
version
  $Revision: 557 $ $Date: 2009-08-29 15:54:38 +0200 (Sat, 29 Aug 2009) $

## \BufferedReader
jump to top

Convenience class for reading files.

Extends from
  \Reader
see
  \FilterReader
access
  public
author
  Yannick Lecaillez
package
  phing.system.io
version
  $Revision: 557 $ $Date: 2009-08-29 15:54:38 +0200 (Sat, 29 Aug 2009) $

### Properties

`$buffer= 'null'`
Default value `null` Details

Type

`$bufferPos= '0'`
Default value `0` Details

Type

`$bufferSize= '0'`
Default value `0` Details

Type

`$in= ''`

The Reader we are buffering for.

Details

Type

### Methods

`__construct( object $reader, integer $buffsize = 65536 ) :`
Parameters

Name | Type | Description
--- | --- | ---
$reader | object | The reader (e.g. FileReader).
$buffsize | integer | The size of the buffer we should use for reading files. A large buffer ensures that most files (all scripts?) are parsed in 1 buffer.

`close( ) :`
`eof( ) : boolean`
Returns whether eof has been reached in stream.

This is important, because filters may want to know if the end of the file (and not just buffer) has been reached.

Returns

Type | Description
--- | ---
boolean |

`getResource( ) :`
`open( ) :`
`read( int $len = null ) : mixed`
Reads and returns a chunk of data.
Parameters

Name | Type | Description
--- | --- | ---
$len | int | Number of bytes to read. Default is to read configured buffer size number of bytes.

Returns

Type | Description
--- | ---
mixed |

`readChar( ) : string`
Reads a single char from the reader.
Returns

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

`readLine( ) :`
Read a line from input stream.
`reset( ) :`
`skip( $n ) :`
Parameters

Name | Type | Description
--- | --- | ---
$n |  |

Documentation was generated by DocBlox 0.13.1.