Results 1 to 4 of 4
  1. #1
    renu is offline Senior Member
    Join Date
    May 2010
    Posts
    117
    Rep Power
    0

    Question how to create a zip output file.

    Hi

    I have a program which will run some SQL queries and based on some conditions will generate 'n' number of output files.

    I want to zip all those output files (now the size of the output files is 103 MB)
    And based on the output from the SQL query ..the size of the output files may change.

    Can any one help me ...with how to write code to zip all those output files and create a zip file.

    Your help is most appreciated.

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    See the API docs for ZipFile, ZipEntry, and ZipOutputStream. You can easily create the zipfile "on the fly" without ever having written the "files".

  3. #3
    renu is offline Senior Member
    Join Date
    May 2010
    Posts
    117
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    See the API docs for ZipFile, ZipEntry, and ZipOutputStream. You can easily create the zipfile "on the fly" without ever having written the "files".
    Sir

    I get this error , when i use the ZipEntry

    Can you pls look into it ...and help me with the solution

    How to create a zip out file from the current directory of input files

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    And, as already mentioned there, there is no constructor for ZipEntry that takes a file. Google a bit and find a tutorial, there are some out there.

Similar Threads

  1. Replies: 0
    Last Post: 09-30-2010, 08:16 PM
  2. Replies: 1
    Last Post: 08-25-2010, 07:57 PM
  3. Replies: 1
    Last Post: 08-04-2010, 03:24 PM
  4. Replies: 8
    Last Post: 05-12-2010, 07:19 PM
  5. Replies: 7
    Last Post: 11-19-2008, 02:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •