# 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

Package: phing\system\io

Convenience class for reading files.

Parent(s)
  \Reader
See
  \FilterReader
Access
  public
Author
  Yannick Lecaillez
Version
  $Revision: 557 $ $Date: 2009-08-29 15:54:38 +0200 (Sat, 29 Aug 2009) $

### Properties

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

Type
  n/a

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

Type
  n/a

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

Type
  n/a

`$in= ''`

The Reader we are buffering for.

Details

Type
  n/a

### Methods

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

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( ) : void`

`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( ) : void`

`mark( ) : void`

`markSupported( ) : void`

`open( ) : void`

`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 | buffer or -1 if EOF.

`readChar( ) : string`

Reads a single char from the reader.

Returns

Type | Description
--- | ---
string | single char or -1 if EOF.

`readLine( ) : void`

Read a line from input stream.

`ready( ) : void`

`reset( ) : void`

`skip( $n ) : void`

Parameters

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

Documentation was generated by DocBlox 0.17.1.