From 54dfaff72dfbdf338807dfbaa7674307fccdd7d1 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 11 Sep 2013 15:46:06 +0200 Subject: [PATCH] Add normalized method. --- src/fr/devinsy/util/xml/XMLZipWriter.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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