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
相关阅读
关于Java design pattern古德霸是goodbug, 老赵是zhaoce, zhaoce073求refer,推荐,长短期,free都可以,一个月工资作为感谢我来回答一下投行IT的问题我的同学朋友学CS的全在25万以上 (转载)请问用什么java developer? 在哪里下载?我Google过了,还是不明白Framework有用jdeveloper的吗?感觉inner class挺好用的中年生物千老有孩大妈想干data analyst的工作design pattern in Java那本书比较好?Spring MVC vs Play 2怎样实现像chrome 中的独立的dockable tabbed pane/window你们现在用javafx么?各位大牛帮看看段代码MongoDB for Java Developers Starts Today借人气问一下SCEA (转载)Netflix 内推 (转载)那个快?菜鸟问个简单的问题