Yeah. Probably should have documented a little more to start off with.
I sent it off early because I wanted to see if folks were interested in
the functionality first. I wrote up a bunch of JavaDoc for some of the
bigger classes. It's not perfect, but hopefully it will make it much
easier to figure out what's going on.
JavaDoc:
http://sandbox.sourcelabs.com/willpugh/myzip-1/docs/apidocs/
Src Drop (old one + new Javadoc comments):
http://sandbox.sourcelabs.com/willpugh/myzip-1/myzip-1-src.zip
To answer your more specific questions:
If you create a com.sourcelabs.zipper.zip.ModifiableZipFile, there are a
number of new entries.
AddEntry -- Adds a new entry (fails if one by the same name is
already there)
ModifyEntry -- Modifies an existing entry (fails if one is not there)
AddOrModifyEntry -- Adds entry if one is not there, and modifies if
one is there
RemoveEntry -- Removes an entry
You can use these to build up a list of the changes to make. Then you call
ApplyChanges to actually apply the changes to the zip file.
We do modify the file in place. The method we currently use is to:
1) First get rid of the removed and modified entries and compact
the unchanged ones.
2) Go through all the modified and added entries and write them to
the file
3) Write out the index.
Initial glance makes it seem easy to apply the Archiver interface to my
classes. I'll see if I can get an implementation over the next few days.
--Will
C. Grobmeier wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'd love to see your code, although I don't think we should merge until
we get the code contributed. It looks like contributing code gets a bit
harder when there are more than one person involved in writing it.
It's easily possible to "merge" if you would implement the
Archiver-Interface. You could just head off the older zip implementation
and drop yours in.
Please use:
http://www.grobmeier.de/commons-compress-draft-4.zip
But please notice, i have to do a lot of changes suggested by Sandy
McArthur. Its under heavy construction.
My factory is being updated next days.
Further it was very difficult to easily browse your code, cause it's not
documented. Can you tell me how you delete a file from the zip? Do you
manipulate the bytes directly?
cheers
chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFETLZmkv8rKBUE/T4RAq7qAJ4gKdfdsqRPxUwSN4BOdx8q/Yjl+gCffoe0
tTBfkfbqMd1wMpltMZrCUdg=
=l/d6
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]