F****n 发帖数: 3271 | 1 Believe it or not, this is incrediably difficult in Java. The only solution I
found is to copy the whole file, which is so stupid. |
c**g 发帖数: 274 | 2 I think you can somehow use the manifest-file, not sure never did this.
【在 F****n 的大作中提到】 : Believe it or not, this is incrediably difficult in Java. The only solution I : found is to copy the whole file, which is so stupid.
|
st 发帖数: 1685 | 3 what do you mean? it's just a zip file.. delete what entry?
【在 F****n 的大作中提到】 : Believe it or not, this is incrediably difficult in Java. The only solution I : found is to copy the whole file, which is so stupid.
|
F****n 发帖数: 3271 | 4 An entry is a file or folder in a zip file. Seems it is impossible to append,
modify or delete the content of a zip except create a new copy of the whole
file.
solution I
【在 st 的大作中提到】 : what do you mean? it's just a zip file.. delete what entry?
|
st 发帖数: 1685 | 5 well, some will allow the operation, but actually create new file for you...
what ever... zip is not for edit....
【在 F****n 的大作中提到】 : An entry is a file or folder in a zip file. Seems it is impossible to append, : modify or delete the content of a zip except create a new copy of the whole : file. : : solution I
|
F****n 发帖数: 3271 | 6
So why you can add / delete files using winzip?
append,
whole
【在 st 的大作中提到】 : well, some will allow the operation, but actually create new file for you... : what ever... zip is not for edit....
|
st 发帖数: 1685 | 7 I think winzip uncompress file and compress them back.
btw, jar can be compressed or uncompressed, compressed format is just zip,
(some software might create weird zip), you can associate .jar with winzip,
or rename the file to .zip.
【在 F****n 的大作中提到】 : : So why you can add / delete files using winzip? : append, : whole
|
e***g 发帖数: 158 | 8 i'll take your word for it, and try to justify that it's not so stupid.
however if it turns out that jar API does do it, then it's your fault:)
if you want to remove one node from an XML file, and you want to use the
'ellegantly designed user friendly' DOM/SAX API, you have to read the whole
thing, change the structure in memory/on the fly, and serialize it to a
new file.
so same thing here for jar. the API is designed to be source/target
agnostic, it does not (want to) concern itself with featu
【在 F****n 的大作中提到】 : Believe it or not, this is incrediably difficult in Java. The only solution I : found is to copy the whole file, which is so stupid.
|
st 发帖数: 1685 | 9 that's not his point, at all.
【在 e***g 的大作中提到】 : i'll take your word for it, and try to justify that it's not so stupid. : however if it turns out that jar API does do it, then it's your fault:) : if you want to remove one node from an XML file, and you want to use the : 'ellegantly designed user friendly' DOM/SAX API, you have to read the whole : thing, change the structure in memory/on the fly, and serialize it to a : new file. : so same thing here for jar. the API is designed to be source/target : agnostic, it does not (want to) concern itself with featu
|
xt 发帖数: 17532 | 10
I
Try,
1) winzip, if you are deleting an entry without programming;
2) java.util.zip
【在 F****n 的大作中提到】 : Believe it or not, this is incrediably difficult in Java. The only solution I : found is to copy the whole file, which is so stupid.
|
|
|
xt 发帖数: 17532 | 11
append,
Now you make me wonder if you really a Computer Skience major. hehe
【在 F****n 的大作中提到】 : An entry is a file or folder in a zip file. Seems it is impossible to append, : modify or delete the content of a zip except create a new copy of the whole : file. : : solution I
|
F****n 发帖数: 3271 | 12 You must be kidding, you mean if I have a 100mb zip file (it is usual in many
case) and I want to add or delete one file from it, I need to copy the whole
100mb content? That's ridiculous.
you...
【在 st 的大作中提到】 : I think winzip uncompress file and compress them back. : btw, jar can be compressed or uncompressed, compressed format is just zip, : (some software might create weird zip), you can associate .jar with winzip, : or rename the file to .zip.
|
st 发帖数: 1685 | 13 try it with winzip, I saw the temp file created there.. with similar
size.. so if you want to do that on a 100mb zip, winzip would do such
stupid thing for you. it's ridiculous but I am not kidding.
【在 F****n 的大作中提到】 : You must be kidding, you mean if I have a 100mb zip file (it is usual in many : case) and I want to add or delete one file from it, I need to copy the whole : 100mb content? That's ridiculous. : : you...
|
F****n 发帖数: 3271 | 14 Both of your points doesnot make since. At least up to JDK1.4.2, it is
impossible using java.util.zip. I am not kidding, probably my experience with
this package is much more than most people on this board.
solution
【在 xt 的大作中提到】 : : append, : Now you make me wonder if you really a Computer Skience major. hehe
|
B******N 发帖数: 445 | 15 why impossible?
with
【在 F****n 的大作中提到】 : Both of your points doesnot make since. At least up to JDK1.4.2, it is : impossible using java.util.zip. I am not kidding, probably my experience with : this package is much more than most people on this board. : : solution
|
F****n 发帖数: 3271 | 16 Look at the API yourself.
【在 B******N 的大作中提到】 : why impossible? : : with
|
B******N 发帖数: 445 | 17 i am about to use it today or tomorrow.
【在 F****n 的大作中提到】 : Look at the API yourself.
|
F****n 发帖数: 3271 | 18 If you just need to read or copy it, its OK,
otherwise, you have to use the stupid techniques I have used.
experience
【在 B******N 的大作中提到】 : i am about to use it today or tomorrow.
|