org.apache.tools.ant.filters.util

Class ChainReaderHelper


public final class ChainReaderHelper
extends java.lang.Object

Process a FilterReader chain.

Field Summary

int
bufferSize
The size of the buffer to be used.
Vector
filterChains
Chain of filters
Reader
primaryReader
The primary reader to which the reader chain is to be attached.

Method Summary

Reader
getAssembledReader()
Assemble the reader
Project
getProject()
Get the project
String
readFully(Reader rdr)
Read data from the reader and return the contents as a string.
void
setBufferSize(int size)
Sets the buffer size to be used.
void
setFilterChains(Vector fchain)
Sets the collection of filter reader sets
void
setPrimaryReader(Reader rdr)
Sets the primary reader
void
setProject(Project project)
Set the project to work with

Field Details

bufferSize

public int bufferSize
The size of the buffer to be used.

filterChains

public Vector filterChains
Chain of filters

primaryReader

public Reader primaryReader
The primary reader to which the reader chain is to be attached.

Method Details

getAssembledReader

public final Reader getAssembledReader()
            throws BuildException
Assemble the reader
Returns:
the assembled reader
Throws:
BuildException - if an error occurs

getProject

public final Project getProject()
Get the project
Returns:
the current project

readFully

public final String readFully(Reader rdr)
            throws IOException
Read data from the reader and return the contents as a string.
Parameters:
rdr - the reader object
Returns:
the contents of the file as a string

setBufferSize

public final void setBufferSize(int size)
Sets the buffer size to be used. Defaults to 4096, if this method is not invoked.
Parameters:
size - the buffer size to use

setFilterChains

public final void setFilterChains(Vector fchain)
Sets the collection of filter reader sets
Parameters:
fchain - the filter chains collection

setPrimaryReader

public final void setPrimaryReader(Reader rdr)
Sets the primary reader
Parameters:
rdr - the reader object

setProject

public final void setProject(Project project)
Set the project to work with
Parameters:
project - the current project

Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.