public class FilteredDataEntryReader extends java.lang.Object implements DataEntryReader
DataEntryReader
delegates to one of two other DataEntryReader
instances,
depending on whether the data entry passes through a given data entry filter or not.Constructor and Description |
---|
FilteredDataEntryReader(DataEntryFilter dataEntryFilter,
DataEntryReader acceptedDataEntryReader)
Creates a new FilteredDataEntryReader with only a reader for accepted data entries.
|
FilteredDataEntryReader(DataEntryFilter dataEntryFilter,
DataEntryReader acceptedDataEntryReader,
DataEntryReader rejectedDataEntryReader)
Creates a new FilteredDataEntryReader.
|
Modifier and Type | Method and Description |
---|---|
void |
read(DataEntry dataEntry)
Reads the given data entry.
|
public FilteredDataEntryReader(DataEntryFilter dataEntryFilter, DataEntryReader acceptedDataEntryReader)
dataEntryFilter
- the data entry filter.acceptedDataEntryReader
- the DataEntryReader to which the reading will be delegated if
the filter accepts the data entry. May be null
.public FilteredDataEntryReader(DataEntryFilter dataEntryFilter, DataEntryReader acceptedDataEntryReader, DataEntryReader rejectedDataEntryReader)
dataEntryFilter
- the data entry filter.acceptedDataEntryReader
- the DataEntryReader to which the reading will be delegated if
the filter accepts the data entry. May be null
.rejectedDataEntryReader
- the DataEntryReader to which the reading will be delegated if
the filter does not accept the data entry. May be null
.public void read(DataEntry dataEntry) throws java.io.IOException
DataEntryReader
read
in interface DataEntryReader
java.io.IOException