Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > ZipoutputStream Reading/ adding zip file comments

Reply
Thread Tools

ZipoutputStream Reading/ adding zip file comments

 
 
Claudio Barradas
Guest
Posts: n/a
 
      06-22-2004
hi!
i'm trying to put comments on zip files using Zip out put stream.
i've tried two ways:

1-
ZipOutputStream out = new ZipOutputStream(new
BufferedOutputStream(checksum));
out.setComment(comment);

I can write the commnent, but there is no way to read it then.

2-
ZipEntry entry = new ZipEntry("filename");
entry.setComment(comment);

i set the comment! but it is not keeped in zip file. When i try to read it
entry.getComment(); always return null!

please help me




 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      06-22-2004
On Tue, 22 Jun 2004 23:51:57 +0100, "Claudio Barradas"
<(E-Mail Removed)> wrote or quoted :

>1-
> ZipOutputStream out = new ZipOutputStream(new
>BufferedOutputStream(checksum));
> out.setComment(comment);
>
>I can write the commnent, but there is no way to read it then.
>
>2-
> ZipEntry entry = new ZipEntry("filename");
> entry.setComment(comment);
>
>i set the comment! but it is not keeped in zip file. When i try to read it
>entry.getComment(); always return null!


try looking at the file generated with a hex viewer or Winzip. Then
you can tell if the problem is in the reading or writing.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ZipOutputStream Erik Java 14 01-30-2010 12:35 PM
Issue with ZipOutputStream class in my .net application. VijayV Java 2 04-11-2008 05:57 AM
Possibility to add a zip-file to a new zip-file with "add to zip" (right-click) ?? erikkie@casema.nl Computer Support 4 06-26-2006 12:18 AM
ZipOutputStream, ZipFile and Linux unzip do not agree on the file count in zip C B Java 4 11-10-2004 11:13 AM
ZipOutputStream and binary data JScoobyCed Java 13 06-25-2004 02:22 AM



Advertisments