be.re.repo.mod
Class ZippedDocumentTransformer
java.lang.Object
be.re.repo.mod.ZippedDocumentTransformer
public class ZippedDocumentTransformer
- extends Object
Implements a mechanism to transform entries in zipped documents in a
streaming-oriented fashion without resorting to temporary files. Possible
formats are ODF, ePub, Office Open XML, etc.
- Author:
- Werner Donné
ZippedDocumentTransformer
public ZippedDocumentTransformer()
transform
public static InputStream transform(InputStream in,
ZippedDocumentTransformer.Transform transform,
String[] entryPatterns)
throws IOException
- Transforms a selected ZIP-entry.
- Parameters:
in
- the original document stream.transform
- the object used to transform an entry.entryPatterns
- the regular expressions that select the ZIP-entries
based on their name. If the array is empty no entries will be selected at
all.
- Returns:
- The stream of the transformed document.
- Throws:
IOException