Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Saving files as type in a zip file

807603Dec 14 2007 — edited Dec 14 2007
This is probably more simple than I think it is, but I'm having trouble reading files back correctly (outside the program) after I've programmatically made the zip file.

I'm trying to zip up selected contents of a database by getting the item, and then writing the contents of the database entry out to the zip file through a byte stream. This all works fine, but all the entries in the zip file are "files" with no extension, so they don't open properly, if at all. Is there a way to save file types correctly in a zip file based on content? The database doesn't preserve filenames, all items are referred to by unique ID's. Any help is much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2008
Added on Dec 14 2007
17 comments
591 views