Re: invalid archives with java.util.zip
- From: Andrew Thompson <andrewthommo@xxxxxxxxx>
- Date: Mon, 30 Jun 2008 00:57:50 -0700 (PDT)
On Jun 30, 5:32 pm, j...@xxxxxxxxx wrote:
...
I have a problem with ZIP files in JDK 1.5.
I'm using the following code to create a ZIP file from an XML
document:
It is difficult to tell much from code snippets,
but you might try..
Document doc;
// create document and set root element
ZipOutputStream out = new ZipOutputStream(new
FileOutputStream(filenameZIP));
out.putNextEntry(new ZipEntry(filenameXML));
<http://java.sun.com/javase/6/docs/api/java/util/zip/
ZipOutputStream.html#closeEntry()>
// fill document and write it to output stream
out.close();
..closely followed by some if the other methods
meant to finish up ZIPs, that are mentioned in
them there JavaDocs.
--
Andrew Thompson
http://pscode.org/
.
- References:
- invalid archives with java.util.zip
- From: js
- invalid archives with java.util.zip
- Prev by Date: invalid archives with java.util.zip
- Next by Date: Re: Translate attempt
- Previous by thread: invalid archives with java.util.zip
- Index(es):
Relevant Pages
|