ProGuard

proguard.io
Class FilteredDataEntryReader

java.lang.Object
  extended byproguard.io.FilteredDataEntryReader
All Implemented Interfaces:
DataEntryReader

public class FilteredDataEntryReader
extends Object
implements DataEntryReader

This 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 Summary
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.
 
Method Summary
 void read(DataEntry dataEntry)
          Reads the given data entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredDataEntryReader

public FilteredDataEntryReader(DataEntryFilter dataEntryFilter,
                               DataEntryReader acceptedDataEntryReader)
Creates a new FilteredDataEntryReader with only a reader for accepted data entries.

Parameters:
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.

FilteredDataEntryReader

public FilteredDataEntryReader(DataEntryFilter dataEntryFilter,
                               DataEntryReader acceptedDataEntryReader,
                               DataEntryReader rejectedDataEntryReader)
Creates a new FilteredDataEntryReader.

Parameters:
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.
Method Detail

read

public void read(DataEntry dataEntry)
          throws IOException
Description copied from interface: DataEntryReader
Reads the given data entry.

Specified by:
read in interface DataEntryReader
Throws:
IOException

ProGuard