Base class for core filter readers.

author | <a href="mailto:yl@seasonfive.com">Yannick Lecaillez</a>
version | $Id$
access | public
see | \global\FilterReader
package | phing.filters

### Methods

## Constructor used by Phing's introspection mechanism.

    __construct(\Reader $in)

The original filter reader is only used for chaining purposes, never for filtering purposes (and indeed it would be useless for filtering purposes, as it has no real data to filter). ChainedReaderHelper uses this placeholder instance to create a chain of real filters.

### Parameters

#### $in

`\Reader`

## Close stream.

    close()

Inherited

inherited_from | \FilterReader::close()

### Exceptions

`\IOException` | if there is an error closing stream

## Returns whether the end of file has been reached with input stream.

    eof() : boolean

### Returns

`boolean`

## Returns the initialized status.

    getInitialized() : boolean

### Returns

`boolean`whether or not the filter is initialized

## Returns the project this filter is part of.

    getProject() : object

### Returns

`object`The project this filter is part of

## Returns the filename, url, etc.

    getResource() : string

Inherited

that is being read from. This is critical for, e.g., ExpatParser's ability to know the filename that is throwing an ExpatParserException, etc.

inherited_from | \FilterReader::getResource()

### Returns

`string`

## Convenience method to support logging in filters.

    log(string $msg, int $level)

### Parameters

#### $msg

`string`

Message to log.

#### $level

`int`

Priority level.

## If supported, places a "marker" (like a bookmark) at current stream position.

    mark()

Inherited

A subsequent call to reset() will move stream position back to last marker (if supported).

inherited_from | \Reader::mark()
inherited_from | \FilterReader::mark()

## Whether marking is supported.

    markSupported() : boolean

Inherited

inherited_from | \Reader::markSupported()
inherited_from | \FilterReader::markSupported()

### Returns

`boolean`

## Reads characters.

    read(\off $len) : \Characters

FIXME: Clean up this function signature, as it a) params aren't being used and b) it doesn't make much sense.

### Parameters

#### $len

`\off`

Offset at which to start storing characters.

### Exceptions

`\IOException` | If an I/O error occurs

### Returns

`\Characters`read, or -1 if the end of the stream has been reached

## Reads a line of text ending with '\n' (or until the end of the stream).

    readLine() : \the

The returned String retains the '\n'.

### Exceptions

`\IOException` | if the underlying reader throws one during reading

### Returns

`\the`line read, or `null` if the end of the stream has already been reached

## Is stream ready for reading.

    ready() : boolean

Inherited

inherited_from | \Reader::ready()
inherited_from | \FilterReader::ready()

### Returns

`boolean`

## Reset the current position in stream to beginning or last mark (if supported).

    reset()

Inherited

inherited_from | \FilterReader::reset()

## Sets the initialized status.

    setInitialized(boolean $initialized)

### Parameters

#### $initialized

`boolean`

Whether or not the filter is initialized.

## Sets the project to work with.

    setProject(\Project $project)

### Parameters

#### $project

`object`

The project this filter is part of. Should not be `null`.

## setReader()

    setReader(\Reader $in)

Inherited

inherited_from | \FilterReader::setReader()

### Parameters

#### $in

## Move stream position relative to current pos.

    skip(int $n)

Inherited

inherited_from | \FilterReader::skip()

### Parameters

#### $n

`int`

### Properties

##

    $in : \Reader

Inherited

inherited_from | \FilterReader::$$in

##

    $initialized

##

    $project