C
Chris Uppal
FamilyNet International Newsgate
From: "Chris Uppal" <[email protected]>
The end.
The only option for "modifying" ZIP files which doesn't amount to making a copy
of the file (with whatever desired changes applied as you do so), is to append
to an existing file. In that case you can overwrite the existing
table-of-contents with the appended file(s), and then recreate the table of
contents. In fact, you can also delete the last N files, but that's not a very
useful operation and in any case depends on being able to truncate a file to a
length other than zero (which is not, IIRC, available on all OSs).
I vaguely remember seeing something about an append operation being
added to the java.util.zip.*; but I can't now recall whether it was just
someone whining in the Bug Parade, or was something concrete planned for an
upcoming release.
-- chris
FamilyNet <> Internet Gated Mail
http://www.familynet-international.org
From: "Chris Uppal" <[email protected]>
Mark said:Hmm, if I remember the zip file formant, there's an index and file count
at the beginning of the zip file,
The end.
But in general, the absence of a generic "add this to an existing
archive" seems defective to me. Maybe there's a good reason for it
though.
The only option for "modifying" ZIP files which doesn't amount to making a copy
of the file (with whatever desired changes applied as you do so), is to append
to an existing file. In that case you can overwrite the existing
table-of-contents with the appended file(s), and then recreate the table of
contents. In fact, you can also delete the last N files, but that's not a very
useful operation and in any case depends on being able to truncate a file to a
length other than zero (which is not, IIRC, available on all OSs).
I vaguely remember seeing something about an append operation being
added to the java.util.zip.*; but I can't now recall whether it was just
someone whining in the Bug Parade, or was something concrete planned for an
upcoming release.
-- chris
FamilyNet <> Internet Gated Mail
http://www.familynet-international.org