• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Archiving Files in zip files

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i write a program that generates as output a set of images and pdf files.Actually i store these files in separate directories one for images and one for pdf files.i want know to archive these files in zip files so that i can later extract each file from the archive so i can view it to the user in adobe reader.the zip utility in java provide a facility to get InputStream to each entry in zip file but i want really is the actual file from the zip so i can view it in adobe reader.anyone can give me an idea how that can be performed.
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Wael Atef:
Hi all,
i write a program that generates as output a set of images and pdf files.Actually i store these files in separate directories one for images and one for pdf files.i want know to archive these files in zip files so that i can later extract each file from the archive so i can view it to the user in adobe reader.the zip utility in java provide a facility to get InputStream to each entry in zip file but i want really is the actual file from the zip so i can view it in adobe reader.anyone can give me an idea how that can be performed.


I assume that what you wish to achieve is through the following process:
Output from first application:
  • Put all of the files in the two directories as entries into a single zip file.


  • Input back into the application at a later time:
  • Open the zip archive
  • Extract a particular entry with the specified name
  • Open this file in the appropriate native program (e.g. Acrobat reader)


  • If these stages are correct, I think I can help you, but I feel that your question needs a little clarification for a more succinct answer!
     
    Can't .... do .... plaid .... So I did this tiny ad instead:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!