Results 1 to 2 of 2
  1. #1
    magesh joghee is offline Member
    Join Date
    Aug 2011
    Posts
    1
    Rep Power
    0

    Default Error in unzip for large files

    Hi,
    I am using java unzip functionality to unzip a file which is greater than 100 MB.

    When I test my code in Windows, the unzip functionality works fine.

    But my requirement is to run the program in unix env. When i try the same code in unix env, i am getting the below exception -

    05:15:38,180 ERROR main UnzipFile:148 - Errror in UNZIP File: invalid entry size (expected 121761181 but got 121757886 bytes)
    java.util.zip.ZipException: invalid entry size (expected 121761181 but got 121757886 bytes)

    Can you please help me in resolving this error.

    Sample Code -

    OutputStream out = new FileOutputStream(outFilename);
    // Transfer bytes from the ZIP file to the output file
    byte[] buf = new byte[1024];
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    }

    Thanks in advance.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

Similar Threads

  1. Help reading large files
    By JavaLatte in forum New To Java
    Replies: 0
    Last Post: 05-11-2011, 03:29 PM
  2. Large Wave Files
    By dane1193 in forum New To Java
    Replies: 2
    Last Post: 02-18-2011, 11:59 PM
  3. Copying large files efficiently
    By bayan in forum New To Java
    Replies: 2
    Last Post: 10-27-2010, 06:01 PM
  4. Compare 2 large files
    By bezudar in forum Advanced Java
    Replies: 3
    Last Post: 11-23-2008, 03:18 AM
  5. OutofMemory while downloading large files through FTP
    By deb_santanu in forum Advanced Java
    Replies: 0
    Last Post: 11-13-2008, 02:04 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
  •