T - Object type to create the abstract xml packager for.public abstract class AbstractXmlPackager<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractXmlPackager.CompressionLevel
ZIP Compression Level.
|
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOGGER
Logger.
|
| Constructor and Description |
|---|
AbstractXmlPackager(OutputStream out)
Create a new AbstractXmlPackager.
|
AbstractXmlPackager(Path zipPath,
OutputStream out)
Create a new AbstractXmlPackager.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
packageXml(T document,
String docName)
Packages an XML document to a zipped binary output stream.
|
protected abstract byte[] |
parseDocument(T document)
Parses an XML document into a byte array.
|
void |
setCompressionLevel(AbstractXmlPackager.CompressionLevel compressionLevel)
Setter for compressionLevel attribute.
|
AbstractXmlPackager<T> |
withZipPath(Path zipPath)
Sets a reference to an already existing archive.
|
public AbstractXmlPackager(OutputStream out)
out - The underlying OutputStream to write the package to.public AbstractXmlPackager(Path zipPath, OutputStream out)
zipPath - The path to an existing zip archive.out - The underlying OutputStream to write the package to.public final AbstractXmlPackager<T> withZipPath(Path zipPath)
zipPath - The path to existing archivepublic final void setCompressionLevel(AbstractXmlPackager.CompressionLevel compressionLevel)
compressionLevel - the compressionLevel to setprotected final void packageXml(T document, String docName) throws PackagerException
document - Document to package.docName - File name of the document in the zip package.PackagerException - If the XML document could not be packaged.Copyright © 2016. All rights reserved.