T - The type returned by process(String, InputStream, long, long, ProducerWhichThrows)public class SelectiveContentsProcessor<T> extends Object implements ContentsProcessor<T>
| Constructor and Description |
|---|
SelectiveContentsProcessor(Predicate<? super String> pathPredicate,
ContentsProcessor<T> trueDelegate,
ContentsProcessor<T> falseDelegate) |
| Modifier and Type | Method and Description |
|---|---|
T |
process(String path,
InputStream is,
long size,
long crc32,
ProducerWhichThrows<? extends InputStream,? extends IOException> opener)
If the pathPredicate evaluates to
true for the path, then the
trueDelegate is called, otherwise the falseDelegate. |
public SelectiveContentsProcessor(Predicate<? super String> pathPredicate, ContentsProcessor<T> trueDelegate, ContentsProcessor<T> falseDelegate)
@Nullable public T process(String path, InputStream is, long size, long crc32, ProducerWhichThrows<? extends InputStream,? extends IOException> opener) throws IOException
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 inputStreamIOException - Message should NOT include the pathCopyright © 2018 Arno Unkrig. All rights reserved.