T - The type returned by process(String, InputStream, long, long, ProducerWhichThrows)public class SelectiveContentsProcessor<T> extends java.lang.Object implements ContentsProcessor<T>
| Constructor and Description |
|---|
SelectiveContentsProcessor(Predicate<? super java.lang.String> pathPredicate,
ContentsProcessor<T> trueDelegate,
ContentsProcessor<T> falseDelegate) |
| Modifier and Type | Method and Description |
|---|---|
T |
process(java.lang.String path,
java.io.InputStream is,
long size,
long crc32,
ProducerWhichThrows<? extends java.io.InputStream,? extends java.io.IOException> opener)
If the
pathPredicate evaluates to true for the path, then the trueDelegate is
called, otherwise the falseDelegate. |
public SelectiveContentsProcessor(Predicate<? super java.lang.String> pathPredicate, ContentsProcessor<T> trueDelegate, ContentsProcessor<T> falseDelegate)
@Nullable public T process(java.lang.String path, java.io.InputStream is, long size, long crc32, ProducerWhichThrows<? extends java.io.InputStream,? extends java.io.IOException> opener) throws java.io.IOException
pathPredicate evaluates to true for the path, then the trueDelegate is
called, otherwise the falseDelegate.process in interface ContentsProcessor<T>path - E.g. "c:/dir/zipfile!dir/zipfile!dir/file"size - -1 if unknowncrc32 - -1 if unknownopener - Re-produces the inputStreamjava.io.IOException - Message should NOT include the path