diff --git a/src/fr/devinsy/util/xml/XMLZipWriter.java b/src/fr/devinsy/util/xml/XMLZipWriter.java index 020d3e5..51c0148 100644 --- a/src/fr/devinsy/util/xml/XMLZipWriter.java +++ b/src/fr/devinsy/util/xml/XMLZipWriter.java @@ -58,6 +58,24 @@ public class XMLZipWriter extends XMLWriter this.out = new PrintWriter(new OutputStreamWriter(zos, "UTF-8")); } + /** + * + * @param target + * @throws IOException + */ + public XMLZipWriter(final OutputStream target, final String generator) throws IOException + { + super(); + this.zos = new ZipOutputStream(target); + zos.setLevel(Deflater.BEST_COMPRESSION); + zos.setMethod(ZipOutputStream.DEFLATED); + if (generator != null) + { + zos.setComment(generator); + } + this.out = new PrintWriter(new OutputStreamWriter(zos, "UTF-8")); + } + /** * * @param target