F*n
2 楼
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.
found is to copy the whole file, which is so stupid.
st
6 楼
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
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
st
8 楼
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
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
9 楼
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.
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
10 楼
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
【在 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
F*n
13 楼
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.
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
14 楼
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...
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
15 楼
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
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
相关阅读
why people use Junit?问个基本问题java question觉得martin fowler在领导现在j2ee潮流啊.jdilog extends can't add jpanel?What is Apache Harmony?Any good book about web service with JAVAah, the "killer feature" of eclipse怎么返回一个变量的地址?请教问题,怎么确定空行!j2ee现在流行什么?swing 在 mac intel 下的bug怎么修正?Extracting JavaDoc comment?zt 京城各java培训机构比较any good java tool for txt->xml conversion?anyone use jini?Plan to learn Java, need some help!regular expression for whitespace in pathJAVA 6 releasedjava certificate问题