public final class ChainReaderHelper
extends Object 
Process a FilterReader chain.
- 
Nested Class SummaryNested Classes 
- 
Field SummaryFields 
int
 
The size of the buffer to be used. 
 
The primary reader to which the reader chain is to be attached. 
 
 
- 
Constructor SummaryConstructors 
- 
Method Summary
Read data from the reader and return the
 contents as a string. 
 void
 
Sets the buffer size to be used. 
 void
 
Sets the collection of filter reader sets 
 void
 void
 
Set the project to work with 
 
Fluent mechanism to apply some  Consumer. 
 
Fluent buffer size mutator. 
 
Fluent filterChainsmutator.
 
 
Fluent primary  Reader mutator. 
 
 
 
 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
- 
Field Details
- 
primaryReaderThe primary reader to which the reader chain is to be attached. 
- 
bufferSizepublic int bufferSize The size of the buffer to be used. 
- 
filterChainsChain of filters 
 
- 
Constructor Details
- 
ChainReaderHelperpublic ChainReaderHelper() Default constructor. 
- 
 
- 
Method Details
- 
setPrimaryReaderpublic void setPrimaryReader(Reader rdr) 
- Parameters:
- rdr- the reader object
 
- 
withPrimaryReaderFluent primary  Reader mutator. 
- Parameters:
- rdr- Reader
- Returns:
- this
 
- 
- 
- 
getProjectGet the project 
- Returns:
- the current project
 
- 
setBufferSizepublic void setBufferSize(int size) Sets the buffer size to be used.  Defaults to 8192,
 if this method is not invoked. 
- Parameters:
- size- the buffer size to use
 
- 
withBufferSizeFluent buffer size mutator. 
- Parameters:
- size- ditto
- Returns:
- this
 
- 
setFilterChainsSets the collection of filter reader sets 
- Parameters:
- fchain- the filter chains collection
 
- 
withFilterChainsFluent filterChainsmutator.
 
- Parameters:
- filterChains- ditto
- Returns:
- this
 
- 
withFluent mechanism to apply some  Consumer. 
- Parameters:
- consumer- ditto
- Returns:
- this
 
- 
getAssembledReaderAssemble the reader 
- Returns:
- the assembled reader
- Throws:
- BuildException- if an error occurs
 
- 
readFullyRead 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
- Throws:
- IOException- if an error occurs