|
-
October 4th, 1999, 03:33 AM
#1
ZipOutputStream
Hi,
I'm using these lines to open a zip file, write an entry and fill the entry with data:
ZipOutputStream blas = new ZipOutputStream(new FileOutputStream("testing.zip"));
ZipEntry ze = new ZipEntry("knut.txt");
blas.putNextEntry(ze);
byte blab[];
String str = new String("HALLO");
blab = str.getBytes();
blas.write(blab, 0, blab.length);
blas.finish();
Now, this creates a new zip file everytime I do it. But I'd rather like to add entries to that zip file, I've tried to open it this way:
ZipOutputStream blas = new ZipOutputStream(new FileOutputStream("testing.zip", true));
But this gives a corrupt zip file - because it appends the basic file, but not the zip file in its structure...
Does anyone know how to do it?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|