de.unkrig.commons.file.contentsprocessing
Interface ContentsProcessor<T>

Type Parameters:
T - The type produced by process(String, InputStream, long, long, ProducerWhichThrows)
All Known Implementing Classes:
SelectiveContentsProcessor

public interface ContentsProcessor<T>

See Also:
process(String, InputStream, long, long, ProducerWhichThrows)

Method Summary
 T process(java.lang.String path, java.io.InputStream inputStream, long size, long crc32, ProducerWhichThrows<java.io.InputStream,java.io.IOException> opener)
          Reads from the input stream (typically until end-of-input), but does not close it.
 

Method Detail

process

@Nullable
T process(java.lang.String path,
                   java.io.InputStream inputStream,
                   long size,
                   long crc32,
                   ProducerWhichThrows<java.io.InputStream,java.io.IOException> opener)
          throws java.io.IOException
Reads from the input stream (typically until end-of-input), but does not close it.

Parameters:
path - E.g. "c:/dir/zipfile!dir/zipfile!dir/file"
size - -1 if unknown
crc32 - -1 if unknown
opener - Re-produces the inputStream
Throws:
java.io.IOException - Message should NOT include the path