Unzipping corrupted zip file

I have a corrupted zip file whose contents I'm trying to salvage. I know that the problem is with one of the files in the sbutman/taxes/ directory, and I've resigned myself to losing it. I've written the following short program to try to extract as much data as I can from the archive:
* Created on Sep 7, 2005
import java.io.*;
import java.util.zip.*;
* @author sbutman
public class ZipExtractor {
    static final int BUFFER = 8192;
    public static void main( String argv[] ) {
        try {
            BufferedOutputStream dest = null;
            FileInputStream fis = new FileInputStream( argv[0] );
            ZipInputStream zis = new ZipInputStream( new BufferedInputStream(
                    fis ) );
            ZipEntry entry;
            while( true ) {
                try {
                    entry = zis.getNextEntry( );
                    if ( entry == null ) break;
                    if ( entry.getName( ).startsWith( "sbutman/taxes/" ) )
                            continue;
                    System.out.println( "Extracting: " + entry.getName( ) );
                    if ( entry.isDirectory( ) ) {
                        File directoryEntry = new File( entry.getName( ) );
                        directoryEntry.mkdir( );
                    else {
                        int count;
                        byte data[] = new byte[BUFFER];
                        // write the files to the disk
                        FileOutputStream fos = new FileOutputStream( entry
                                .getName( ) );
                        dest = new BufferedOutputStream( fos, BUFFER );
                        while( ( count = zis.read( data, 0, BUFFER ) ) != -1 ) {
                            dest.write( data, 0, count );
                        dest.flush( );
                        dest.close( );
                catch( IOException ioe ) {
                    System.out.println( "An IO exception has occurred:" );
                    ioe.printStackTrace( );
                    continue;
            zis.close( );
        catch( Exception e ) {
            System.out.println( "A general exception occurred:" );
            e.printStackTrace( );
}When I run the program, everything works fine until I get to the zip file entry causing the problem. The output looks like this:
An IO exception has occurred:
java.util.zip.ZipException: invalid entry size (expected 4007 but got 4055 bytes)
        at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:367)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
        at ZipExtractor.main(ZipExtractor.java:23)
An IO exception has occurred:
java.io.IOException: Push back buffer is full
        at java.io.PushbackInputStream.unread(PushbackInputStream.java:204)
        at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:348)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
        at ZipExtractor.main(ZipExtractor.java:23)
An IO exception has occurred:
java.io.IOException: Push back buffer is full
        at java.io.PushbackInputStream.unread(PushbackInputStream.java:204)
        at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:348)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:91)
        at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:69)
        at ZipExtractor.main(ZipExtractor.java:23)The second error repeats itself until I ctrl-c out of the program.
What's happening is that the inner catch block detects the zip entry error as expected. It continues on the next pass through the while loop and attempts to read the next entry, whereupon the second IOException is thrown over and over again. (Incidentally, I've also tried using java.util.zip.ZipFile, but it won't even open the file.)
My questions are these:
1. What exactly does "Push back buffer is full" mean? I've looked through the javadocs, but my understanding is still sketchy. Can I manipulate the buffer or otherwise code around the problem in order to prevent this error from being thrown?
2. Is there any way I can see the source code for java.util.zip.ZipInputStream? It would be very helpful to see exactly where and why this error is being thrown.
Any help anyone can provide would be greatly appreciated. By the way, if this question should be better posted in another forum, let me know and I'll re-post it there.

No clue. Too few info.
Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

Similar Messages

  • "zip" Terminal command no help fixing corrupt zip file; any other workarounds?

    I downloaded a ".zip" file containing some files that I need to access.
    When I double-click on it, I get the "Unable to unarchive 'xyz.zip' into '[foldername].' ( Error 1 - Operation not permitted )" message, which many people report when they try to open a corrupt zip file.
    I also tried opening the file with "StuffIt Expander," "Archive Utility," and "The Unarchiver," as well as some specialty zip-compression programs, but none were successful.
    I then installed the very useful "Archive.qlgenerator" plugin (http://homepage.mac.com/xdd/software/archive/) which allowed me to at least see inside the zip file using OSX's "QuickLook" feature. Lo and behold, all the files that were supposed to be in the zip file are indeed in there, as they should be. The problem is not that the zip file is empty, the problem is that it has become corrupted somehow.
    So, what I need to do is either "fix" the corrupted zip file, or alternately find some way to extract the needed files using brute force.
    Following tips given on various forums, I tried using OSX's "zip" command in terminal (http://homepage.mac.com/kelleherk/iblog/C1901548470/E731143104/index.html and http://hintsforums.macworld.com/showthread.php?t=132146). I was able to use it properly, but unfortunately neither the "-F" nor the "-FF" commands were of any helping in "fixing" the zip file. The "-F" command incorrectly said that the zip file was empty and that there was nothing to fix; the stronger "-FF" command came back with
    Could not find:
      xzy.z01
    Hit c      (change path to where this split file is)
        s      (skip this split)
        q      (abort archive - quit)
        e      (end this archive - no more splits)
        z      (look for .zip split - the last split)
    or ENTER  (try reading this split again):
    ...but none of the options produced any result. Pressing "z" gave me
    Could not find or open
      xyz.zip
    ...which means that even "-FF" could not get past whatever problem had corrupted the file.
    So: is there any built-in way for Mac OSX to fix or extract the contents of a zip file corrupted like this?
    Alternately, is there any third-party shareware or freeware that will do the trick?
    (I don't want to have to spend big $$$ on a commercial program since all I need to do is open a single zip file. And there is no way to contact the zip file's original creator, so I can't download an uncorrupted version.)
    Any help would be greatly appreciated.

    Mark:
    When I try your first suggestion in Terminal ("unzip -t /path/to/file"), I get this message:
    Archive:  /xyz.zip
      End-of-central-directory signature not found.  Either this file is not
      a zipfile, or it constitutes one disk of a multi-part archive.  In the
      latter case the central directory and zipfile comment will be found on
      the last disk(s) of this archive.
    unzip:  cannot find zipfile directory in one of /xyz.zip or
            /xyz.zip.zip, and cannot find /xyz.zip.ZIP, period.
    When I try your second suggestion ("unzip -l /path/to/file"), I get the exact same error message. (And yes, I am fixing "/path/to/file" to be the correct path to the actual file).
    And no, it is not really part of a multi-part archive. (Or at least it wasn't supposed to be; only one zip file is available, and there was only supposed to one.) Perhaps the zip was mis-encoded in the first place, so that the person who created it accidentally did something wrong which the unzip applications are interpreting as this file being part of a multi-part archive; but even so, all I have is this one file, so I need to fix it as is, or extract its contents as is, since I have no way to contact the original creator to do it right this time.

  • Problem in unzipping the zip files

    Hi,
    I have created a program to unzip the zip files. But when i try to zip it is creating the zipped files outside the folder where it is to be zipped.
    what is wrong with my code.
    if the zip file is migration.zip
    if the path inside the zip file shows
    and the path inside says this
    /codebase/scripts/
    it would create migration folder and create codebase folder outside the migration folder
    what is wrong with my code
    //Unzip the zip files to the folder with their name
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FilenameFilter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Enumeration;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    // Getting the path to find the type of files
    public class zipper implements FilenameFilter{
              String ext;
              public zipper(String ext)
                   this.ext="." + ext;
              public boolean accept(File dir,String name)
                   return name.endsWith(ext);
    public static void main(String args[]) throws IOException
              try
                        String dir = "D:/a/";
                        File f2 = new File(dir);
                        FilenameFilter fn= new zipper("zip");
                        String ss[]=f2.list(fn);
                   for ( int j = 0; j < ss.length; j++)
                        System.out.println(" Extracting ...." + ss[j]) ;
                        String zipFile = dir + ss[j];
                        ZipFile zf = new ZipFile(zipFile);
                        Enumeration entries = zf.entries();
                        String directoryName = zf.getName();
                        directoryName = directoryName.substring(0, (directoryName.indexOf(":" + File.separator) + 2));
                             String folderName = zf.getName();
                             folderName = folderName.substring(0, folderName.lastIndexOf("."));
                             File file1 = new File(folderName);
                             //File file1 = new File(entries.getName());
                             file1.mkdir();
                   while (entries.hasMoreElements())
                             ZipEntry ze = (ZipEntry) entries.nextElement();
                             String path = directoryName + ze.getName() ;
                             String path1 = folderName + ze.getName();
                             //System.out.println(" : " + path);
                             if (ze.getName().endsWith("/"))
                                       File file = new File(path);
                                       file.mkdir();
                                       continue;
                                       //break;
                        BufferedReader bReader = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
         StringBuffer fileBuffer = new StringBuffer(" ");
         String line ;
                        while ((line = bReader.readLine()) != null)
                                  fileBuffer.append(line);
                                  fileBuffer.append("\r\n");
                                  //line = line + "\r\n";
                                  //byte[] b = new byte[line.length()];
                                  //b =line.getBytes();
                                  //out.write();
                        String fileData = fileBuffer.toString();
         File f1 = new File(path);
                        f1.createNewFile();
                        //FileOutputStream out = new FileOutputStream(folderName + "/" + ze.getName());
                        FileOutputStream out = new FileOutputStream(path);
                        long size = ze.getSize();
                        byte[] data1 = new byte[fileData.length()];
                        for (int i = 0; i < fileData.length(); i++)
                                  data1[i] = (byte) fileData.charAt(i);
         out.write(data1);
         out.close();
                        bReader.close();                         
                   } catch (Exception e)
                             e.printStackTrace();
    Thanks in Advance
    Avinash

    String path = directoryName + ze.getName();
    String path1 = folderName + File.separator+ ze.getName();
    File f1 = new File(path); // pass path1 instead of path
    f1.createNewFile();
    FileOutputStream out = new FileOutputStream(path); // pass path1 instead of path

  • Problem in Unzipping the zip file

    Hi
    I have created a program to unzip the zip files in the folder named after the zip file
    it is working well well when u try to zip zip files put in a directory
    i.e u create a folder name contents and put files into that and then zip it
    but when u directly create a zip file , without putting in a folder
    it creates the folder and zip the files outside the folder
    Another problem is that with the path
    for e.g. suppose the zip file name is contents and path should show
    contents/filename.txt but there are some other files whose path shows
    res/file.txt. In this case it creates a folder of res and put it outside the
    folder with the name of zip file
    I have pasted my code :
    //Unzip the zip files to the folder with their name
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.FilenameFilter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Enumeration;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    // Getting the path to find the type of files
    public class zipper implements FilenameFilter{
              String ext;
              public zipper(String ext)
                   this.ext="." + ext;
              public boolean accept(File dir,String name)
                   return name.endsWith(ext);
    public static void main(String args[]) throws IOException
              try
                        String dir = "D:/";
                        File f2 = new File(dir);
                        FilenameFilter fn= new zipper("zip");
                        String ss[]=f2.list(fn);
                   for ( int j = 0; j < ss.length; j++)
                        System.out.println(" Extracting ...." + ss[j]) ;
                        String zipFile = dir + ss[j];
                        ZipFile zf = new ZipFile(zipFile);
                        Enumeration entries = zf.entries();
                        String directoryName = zf.getName();
                        directoryName = directoryName.substring(0, (directoryName.indexOf(":" + File.separator) + 2));
                             String folderName = zf.getName();
                             folderName = folderName.substring(0, folderName.lastIndexOf("."));
                             File file1 = new File(folderName);
                             //File file1 = new File(entries.getName());
                             file1.mkdir();
                   while (entries.hasMoreElements())
                             ZipEntry ze = (ZipEntry) entries.nextElement();
                             String path = directoryName + ze.getName() ;
                             String path1 = folderName + ze.getName();
                             //System.out.println(" : " + path);
                             if (ze.getName().endsWith("/"))
                                       File file = new File(path);
                                       file.mkdir();
                                       continue;
                                       //break;
                        BufferedReader bReader = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
         StringBuffer fileBuffer = new StringBuffer(" ");
         String line ;
                        while ((line = bReader.readLine()) != null)
                                  fileBuffer.append(line);
                                  fileBuffer.append("\r\n");
                                  //line = line + "\r\n";
                                  //byte[] b = new byte[line.length()];
                                  //b =line.getBytes();
                                  //out.write();
                        String fileData = fileBuffer.toString();
         File f1 = new File(path);
                        f1.createNewFile();
                        //FileOutputStream out = new FileOutputStream(folderName + "/" + ze.getName());
                        FileOutputStream out = new FileOutputStream(path);
                        long size = ze.getSize();
                        byte[] data1 = new byte[fileData.length()];
                        for (int i = 0; i < fileData.length(); i++)
                                  data1[i] = (byte) fileData.charAt(i);
         out.write(data1);
         out.close();
                        bReader.close();                         
                   } catch (Exception e)
                             e.printStackTrace();
    Thanks in Advance
    Avinash

    String path = directoryName + ze.getName();
    String path1 = folderName + File.separator+ ze.getName();
    File f1 = new File(path); // pass path1 instead of path
    f1.createNewFile();
    FileOutputStream out = new FileOutputStream(path); // pass path1 instead of path

  • Unzip a zipped file?

    How can I unzip a zipped file with java ?

    I presume you've read the API of [url http://java.sun.com/j2se/1.4.1/docs/api/java/util/zip/ZipFile.html]ZipFile?

  • JBoss Shuts Down while reading a Corrupt Zip File

    Hi,
    I have a strange problem, where the jboss crashes when i read a corrupt file.
    Code is like this :
    ZipFile zipfile = null;
    Enumeration e = null;
    try
    zipfile = new ZipFile(zipFile);
    e = zipfile.entries();
    catch(Exception e1) {
    e1.printStackTrace();
    while(e.hasMoreElements()) {
    ZipEntry entry = (ZipEntry) e.nextElement();
    JBoss Error Description :
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77FCD91F
    Function=RtlDestroyHeap+0x2DB
    Library=C:\WINNT\system32\ntdll.dll
    Current Java thread:
         at java.util.zip.ZipFile.getNextEntry(Native Method)
         at java.util.zip.ZipFile.access$400(Unknown Source)
         at java.util.zip.ZipFile$2.nextElement(Unknown Source)
         - locked <0x1122c828> (a java.util.zip.ZipFile)
         at com.intruvert.alertarchival.process.CoreRestore.extractDescriptionXML(Unknown Source)
         at com.intruvert.alertarchival.process.ArchivalManager.getArchivalZipFileInfo(Unknown Source)
         - locked <0x330cf478> (a com.intruvert.alertarchival.process.ArchivalManager)
         at com.intruvert.mgmt.alertarchival.AlertArchivalBean.getArchivalZipFileInfo(AlertArchivalBean.java:235)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
         at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
         at org.jboss.ejb.Container.invoke(Container.java:709)
         at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
         at $Proxy236.getArchivalZipFileInfo(Unknown Source)
         at com.intruvert.ui.util.busobj.DBManager.getArchividFile(DBManager.java:397)
         at com.intruvert.ui.util.busobj.DBManager.getFileTransferInfo(DBManager.java:274)
         - locked <0x10ee9ed8> (a com.intruvert.ui.util.busobj.DBManager)
         at com.intruvert.ui.util.servlet.CArchivalUploadServlet.doUpload(CArchivalUploadServlet.java:157)
         - locked <0x15789860> (a com.intruvert.ui.util.servlet.CArchivalUploadServlet)
         at com.intruvert.ui.util.servlet.CArchivalUploadServlet.doPost(CArchivalUploadServlet.java:58)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:158)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x0040B000      C:\CVS_TRIMBLE\ems\Install\jre\bin\java.exe
    0x77F80000 - 0x77FFD000      C:\WINNT\system32\ntdll.dll
    0x7C2D0000 - 0x7C332000      C:\WINNT\system32\ADVAPI32.dll
    0x7C570000 - 0x7C623000      C:\WINNT\system32\KERNEL32.DLL
    0x77D30000 - 0x77DA1000      C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78045000      C:\WINNT\system32\MSVCRT.dll
    0x75030000 - 0x75044000      C:\WINNT\system32\WS2_32.DLL
    0x75020000 - 0x75028000      C:\WINNT\system32\WS2HELP.DLL
    0x08000000 - 0x08138000      C:\CVS_TRIMBLE\ems\Install\jre\bin\client\jvm.dll
    0x77E10000 - 0x77E6F000      C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F7B000      C:\WINNT\system32\GDI32.dll
    0x77570000 - 0x775A0000      C:\WINNT\system32\WINMM.dll
    0x10000000 - 0x10007000      C:\CVS_TRIMBLE\ems\Install\jre\bin\hpi.dll
    0x007C0000 - 0x007CE000      C:\CVS_TRIMBLE\ems\Install\jre\bin\verify.dll
    0x007D0000 - 0x007E9000      C:\CVS_TRIMBLE\ems\Install\jre\bin\java.dll
    0x007F0000 - 0x007FE000      C:\CVS_TRIMBLE\ems\Install\jre\bin\zip.dll
    0x44420000 - 0x4443C000      C:\CVS_TRIMBLE\ems\Install\jre\bin\jdwp.dll
    0x48440000 - 0x48445000      C:\CVS_TRIMBLE\ems\Install\jre\bin\dt_socket.dll
    0x74FD0000 - 0x74FEE000      C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000      C:\WINNT\System32\wshtcpip.dll
    0x487D0000 - 0x487DF000      C:\CVS_TRIMBLE\ems\Install\jre\bin\net.dll
    0x782C0000 - 0x782CC000      C:\WINNT\System32\rnr20.dll
    0x77980000 - 0x779A4000      C:\WINNT\system32\DNSAPI.DLL
    0x75050000 - 0x75058000      C:\WINNT\system32\WSOCK32.DLL
    0x77340000 - 0x77353000      C:\WINNT\system32\iphlpapi.dll
    0x77520000 - 0x77525000      C:\WINNT\system32\ICMP.DLL
    0x77320000 - 0x77337000      C:\WINNT\system32\MPRAPI.DLL
    0x75150000 - 0x7515F000      C:\WINNT\system32\SAMLIB.DLL
    0x75170000 - 0x751BF000      C:\WINNT\system32\NETAPI32.DLL
    0x7C340000 - 0x7C34F000      C:\WINNT\system32\Secur32.dll
    0x77BF0000 - 0x77C01000      C:\WINNT\system32\NTDSAPI.dll
    0x77950000 - 0x7797A000      C:\WINNT\system32\WLDAP32.DLL
    0x751C0000 - 0x751C6000      C:\WINNT\system32\NETRAP.dll
    0x77A50000 - 0x77B3F000      C:\WINNT\system32\OLE32.DLL
    0x779B0000 - 0x77A4B000      C:\WINNT\system32\OLEAUT32.DLL
    0x773B0000 - 0x773DF000      C:\WINNT\system32\ACTIVEDS.DLL
    0x77380000 - 0x773A3000      C:\WINNT\system32\ADSLDPC.DLL
    0x77830000 - 0x7783E000      C:\WINNT\system32\RTUTILS.DLL
    0x77880000 - 0x7790E000      C:\WINNT\system32\SETUPAPI.DLL
    0x7C0F0000 - 0x7C151000      C:\WINNT\system32\USERENV.DLL
    0x774E0000 - 0x77513000      C:\WINNT\system32\RASAPI32.DLL
    0x774C0000 - 0x774D1000      C:\WINNT\system32\RASMAN.DLL
    0x77530000 - 0x77552000      C:\WINNT\system32\TAPI32.DLL
    0x77B50000 - 0x77BD9000      C:\WINNT\system32\COMCTL32.DLL
    0x77C70000 - 0x77CB9000      C:\WINNT\system32\SHLWAPI.DLL
    0x77360000 - 0x77379000      C:\WINNT\system32\DHCPCSVC.DLL
    0x777E0000 - 0x777E8000      C:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000      C:\WINNT\system32\rasadhlp.dll
    0x49330000 - 0x49335000      C:\CVS_TRIMBLE\ems\Install\jre\bin\rmi.dll
    0x49E80000 - 0x49E88000      C:\CVS_TRIMBLE\ems\Install\jre\bin\nio.dll
    0x4A550000 - 0x4A556000      C:\CVS_TRIMBLE\ems\Install\jre\bin\ioser12.dll
    0x4BEE0000 - 0x4BFF2000      C:\CVS_TRIMBLE\ems\Install\jre\bin\awt.dll
    0x77800000 - 0x7781E000      C:\WINNT\system32\WINSPOOL.DRV
    0x76620000 - 0x76630000      C:\WINNT\system32\MPR.DLL
    0x75E60000 - 0x75E7A000      C:\WINNT\system32\IMM32.dll
    0x7CA00000 - 0x7CA23000      C:\WINNT\system32\rsaenh.dll
    0x7C740000 - 0x7C7C7000      C:\WINNT\system32\CRYPT32.dll
    0x77430000 - 0x77440000      C:\WINNT\system32\MSASN1.DLL
    0x77920000 - 0x77943000      C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000      C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000      C:\WINNT\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 54464K, used 24954K [0x10010000, 0x13b20000, 0x13b20000)
    eden space 48448K, 39% used [0x10010000, 0x1128eb08, 0x12f60000)
    from space 6016K, 100% used [0x13540000, 0x13b20000, 0x13b20000)
    to space 6016K, 0% used [0x12f60000, 0x12f60000, 0x13540000)
    tenured generation total 725952K, used 562288K [0x13b20000, 0x40010000, 0x40010000)
    the space 725952K, 77% used [0x13b20000, 0x3603c398, 0x3603c400, 0x40010000)
    compacting perm gen total 39424K, used 39287K [0x40010000, 0x42690000, 0x44010000)
    the space 39424K, 99% used [0x40010000, 0x4266de88, 0x4266e000, 0x42690000)
    Local Time = Tue Jun 21 10:27:43 2005
    Elapsed Time = 198
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_08-b03 mixed mode)
    Could you please hep me out....
    Thanks,
    ~ Ajay Sandesh

    Simply remove the corrupt zip file, and replace it with the valid copy of the zip file.
    regards,
    Owen

  • Corrupted zip file of download pkg

    I've tried downloading App server 7 (Platform edition) several times and from several download locations but each time I get corrupted zip file and can't open it. BTW, other stuff (Application framework, Studio 4, etc) is downloaded correctly. I'm using IE 6.
    Has anyone experienced anything like this ?

    No clue. Too few info.
    Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

  • Unzip a zip file

    Can someone help me for the following problem,
    Iam downloading a zip file from the server to the client.i want to unzip and execute the .EXE file, which is inside the zip file through the java coding.can any one help me!
    thanking you

    I think you can do all of this using the Java runtime interface which allows you to execute command line commands via Java code (ie, launching an EXE).
    See http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    I don't believe there is a component of the Java API that allows you to unzip a zip file. But you could still accomplish this using the winzip command line support. See http://www.winzip.com/wzcline.htm in combination with the Java runtime.

  • Unzip a .zip file programatically??

    Hi all friends,
    I want to unzip a .zip file programatically.For that if any one can give me some code then it will be very help full for me.
    Thanks & Regards
    Bikash

    this thread has some code
    http://forum.java.sun.com/thread.jsp?forum=31&thread=417611
    asjf

  • Corrupt ZIP files in Prod 11.1.2.1 - Workspace

    Hello all,
    This one has me and Oracle Support stumped.
    Only Prod is exhibiting the following issue...
    When exporting reports to a ZIP file, the file becomes corrupt, and gives an error when extracting with Windows. But what actually happens is that a file with the same name and NO extension (i.e. REPORTS) is in the REPORTS.ZIP file. This is what is causing the zip file to corrupt.
    The workaround is to extract the file using 7-ZIP, rename the REPORTS file to REPORTS1.ZIP, save it, then unzip the REPORTS1.ZIP file.
    This REPORTS1.ZIP has the reports that were zipped initially in Workspace.
    Any ideas what may be causing this? No other environment has this issue.
    Thanks in advance!!
    --Ed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    ZIP file seems to be corrupted. You must repair the file first. Do repair the file by using WinRAR program.
    Open WinRAR *>* open ZIP file *>* go to Tools *>* select Repair archive *>* Browse the path *>* check the box Treat the corrupt archive as ZIP *>* click on OK *>* wait for a while once the selected file is repaired *>* click on Close.
    Or if this solution fails to repair the file, then you must take help of third-party ZIP recovery software. A wide range of ZIP recovery software are available on the internet. Check few of them. You can use their demo version first. I can recommend you SysInfoTools ZIP Recovery software. You must try its free demo version before buying any other ZIP recovery software.
    Regards.

  • Unzip the Zip file in ABAP

    Hi
    I want to get the zip file having multiple .dat / .csv files from another server to application server.I want to unzip it and store the individual file to the folder.
    Could you please help me.
    Thanks in advance.
    Amit

    Hi Amit,
    Please check this thread.
    Re: UNZIP file from ABAP
    Hope this will help.
    Regards,
    Ferry Lianto
    Message was edited by: Ferry Lianto

  • Want to partly unzip a zip file

    I'm trying to upgrade a BIllion 7404 gateway. The relevant firmware is at the top of the list here:
    http://au.billion.com/support/bipac7404vgpm.php
    If my understanding is correct the zip file for the firmware upgrade contains a file within it, a .afw file, that will upgrade the firmware on the Billion. However, when I double click on the zip file, Stuffit unzips the whole lot and I end up with 29 separate files that make up the .afw file, whereas I need the .afw file intact.
    If I put the zip file, call it Upgrade.zip, onto a disk called G5-Data (the name I have given the internal drive on my G5), and use the Terminal command unzip, can anyone tell me the exact command I would need to type in to get a hold of the unzipped .afw file that resides within the zip file?
    Thanks in advance for an suggestions.

    Hi Cole,
    I don't really understand how I got the file, but I got it. The file that I wanted itself contains 29 files that you are not supposed to see. When it is unzipped on a PC, the unzip process stops at the first layer, and that file is recognizable by the gateway as a firmware upgrade file. But if you give the gateway the folder with the 29 files it doesn't know what it is.
    Stuffit reaches into the second layer and unpacks the lot into a folder of 29 files. Must be something in the zip file that is incorrectly setup that allows Stuffit to do that.
    Anyway, I tried the command I posted and up came one file. I found a program called BetterZip that also unzips the file correctly. Maybe there is something wrong with Stuffit 10 and I should give it the boot. Do you know anything about that?
    Thanks again for your help,
    Guy

  • Cannot use winzip to unzip the zip file zipped by java.util.zip

    Hi all,
    I use the followcode to create a zip file, and i downlaod it and try to use winzip to unzip this file but fail. The path is correct and i got the zip file. but it just cannot unzip.
    pls help
    thanks alot.
    Kin
              int count = 0;
              count = ContentDocuments.size();
              for (int i = 0; i < bb; i++)     {
                   System.out.println(filenames[i] + "");
              // Create a buffer for reading the files
              byte[] buf = new byte[10*1024*1024];
              try {      
                   String outFilename = MyDir + "zipfile/" + getContentID2()+".zip";
                   System.out.println("outFilename = " + outFilename);
                   ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
                   for (int i=0; i<filenames.length; i++) {           
                        FileInputStream in = new FileInputStream(filenames);
                        out.putNextEntry(new ZipEntry(filenames[i]));
                        int len;
                        while ((len = in.read(buf)) != -1) {               
                             out.write(buf, 0, len);
                        out.closeEntry();
                        in.close();
                   out.close();
              } catch (IOException e)     {
                   System.err.println("zipprocess " + e.getMessage());

    I've written a replacement zip file creator class. Not much tested but it seems to work, however I've yet to try it with the version of WINZIP that rejected my previous attempts. Oh, and the stored dates are garbage.
    * ZipOutputFile.java
    * Created on 25 March 2004, 13:08
    package zip;
    import java.io.IOException;
    import java.nio.ByteBuffer;
    * <p>Creates a ZIP archive in a file which WINZIP should be able to read.</p>
    * <p>Unfortunately zip archives generated by the standard Java class
    * {@link java.util.zip.ZipOutputStream}, while adhering to PKZIPs format specification,
    * don't appear to be readable by some versions of WinZip and similar utilities. This is
    * probably because they use
    * a format specified for writing to a non-seakable stream, where the length and CRC of
    * a file is writen to a special block following the data. Since the length of the binary
    * date is unknown this makes an archive quite complicated to read, and it looks like
    * WinZip hasn't bothered.</p>
    * <p>All data is Deflated. Close completes the archive, flush terminates the current entry.</p>
    * @see java.util.zip.ZipOutputStream
    * @author  Malcolm McMahon
    public class ZipOutputFile extends java.io.OutputStream {
        byte[] oneByte = new byte[1];
        java.io.RandomAccessFile archive;
        public final static short DEFLATE_METHOD = 8;
        public final static short VERSION_CODE = 20;
        public final static short MIN_VERSION = 10;
        public final static int  ENTRY_HEADER_MAGIC = 0x04034b50;
        public final static int  CATALOG_HEADER_MAGIC = 0x02014b50;
        public final static int  CATALOG_END_MAGIC = 0x06054b50;
        private final static short DISC_NUMBER = 0;
        ByteBuffer entryHeader = ByteBuffer.wrap(new byte[30]);
        ByteBuffer entryLater = ByteBuffer.wrap(new byte[12]);
        java.util.zip.CRC32 crcAcc = new java.util.zip.CRC32();
        java.util.zip.Deflater def = new java.util.zip.Deflater(java.util.zip.Deflater.DEFLATED, true);
        int totalCompressed;
        long MSEPOCH;
        byte [] deflateBuf = new byte[2048];
        public static final long SECONDS_TO_DAYS = 60 * 60 * 24;
         * Entry stores info about each file stored
        private class Entry {
            long offset;        // position of header in file
            byte[] name;
            long crc;
            int compressedSize;
            int uncompressedSize;
            java.util.Date date;
             * Contructor also writes initial header.
             * @param fileName Name under which data is stored.
             * @param date  Date to label the file with
             * @TODO get the date stored properly
            public Entry(String fileName, java.util.Date date) throws IOException {
                name = fileName.getBytes();
                this.date = date == null ? new java.util.Date() : date;
                entryHeader.position(10);
                putDate(entryHeader);
                entryHeader.putShort(26, (short)name.length);
                offset = archive.getFilePointer();
                archive.write(entryHeader.array());
                archive.write(name);
                catalog.add(this);
                crcAcc.reset();
                totalCompressed = 0;
                def.reset();
             * Finish writing entry data. Save the lenghts & crc for catalog
             * and go back and fill them in in the entry header.
            public void close() throws IOException {
                def.finish();
                while(!def.finished())
                    deflate();
                entryLater.position(0);
                crc = crcAcc.getValue();
                compressedSize = totalCompressed;
                uncompressedSize = def.getTotalIn();
                entryLater.putInt((int)crc);
                entryLater.putInt(compressedSize);
                entryLater.putInt(uncompressedSize);
                long eof = archive.getFilePointer();
                archive.seek(offset + 14);
                archive.write(entryLater.array());
                archive.seek(eof);
             * Write the catalog data relevant to this entry. Buffer is
             * preloaded with fixed data.
             * @param buf Buffer to organise fixed lenght part of header
            public void writeCatalog(ByteBuffer buf) throws IOException {
                buf.position(12);
                putDate(buf);
                buf.putInt((int)crc);
                buf.putInt(compressedSize);
                buf.putInt(uncompressedSize);
                buf.putShort((short)name.length);
                buf.putShort((short)0);  // extra field length
                buf.putShort((short)0);  // file comment length
                buf.putShort(DISC_NUMBER);  // disk number
                buf.putShort((short)0); // internal attributes
                buf.putInt(0);      // external file attributes
                buf.putInt((int)offset); // file position
                archive.write(buf.array());
                archive.write(name);
             * This writes the entries date in MSDOS format.
             * @param buf Where to write it
             * @TODO Get this generating sane dates
            public void putDate(ByteBuffer buf) {
                long msTime = (date.getTime() - MSEPOCH) / 1000;
                buf.putShort((short)(msTime % SECONDS_TO_DAYS));
                buf.putShort((short)(msTime / SECONDS_TO_DAYS));
        private Entry entryInProgress = null; // entry currently being written
        private java.util.ArrayList catalog = new java.util.ArrayList(12);  // all entries
         * Start a new output file.
         * @param name The name to store as
         * @param date Date - null indicates current time
        public java.io.OutputStream openEntry(String name, java.util.Date date) throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            entryInProgress = new Entry(name, date);
            return this;
         * Creates a new instance of ZipOutputFile
         * @param fd The file to write to
        public ZipOutputFile(java.io.File fd) throws IOException {
            this(new java.io.RandomAccessFile(fd, "rw"));
         * Create new instance of ZipOutputFile from RandomAccessFile
         * @param archive RandomAccessFile
        public ZipOutputFile(java.io.RandomAccessFile archive) {
            this.archive = archive;
            entryHeader.order(java.nio.ByteOrder.LITTLE_ENDIAN);  // create fixed fields of header
            entryLater.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            entryHeader.putInt(ENTRY_HEADER_MAGIC);
            entryHeader.putShort(MIN_VERSION);
            entryHeader.putShort((short)0);  // general purpose flag
            entryHeader.putShort(DEFLATE_METHOD);
            java.util.Calendar cal = java.util.Calendar.getInstance();
            cal.clear();
            cal.set(java.util.Calendar.YEAR, 1950);
            cal.set(java.util.Calendar.DAY_OF_MONTH, 1);
    //        def.setStrategy(Deflater.HUFFMAN_ONLY);
            MSEPOCH = cal.getTimeInMillis();
         * Writes the master catalogue and postamble and closes the archive file.
        public void close() throws IOException{
            if(entryInProgress != null)
                entryInProgress.close();
            ByteBuffer catEntry = ByteBuffer.wrap(new byte[46]);
            catEntry.order(java.nio.ByteOrder.LITTLE_ENDIAN);
            catEntry.putInt(CATALOG_HEADER_MAGIC);
            catEntry.putShort(VERSION_CODE);
            catEntry.putShort(MIN_VERSION);
            catEntry.putShort((short)0);
            catEntry.putShort(DEFLATE_METHOD);
            long catStart = archive.getFilePointer();
            for(java.util.Iterator it = catalog.iterator(); it.hasNext();) {
                ((Entry)it.next()).writeCatalog(catEntry);
            catEntry.position(0);
            catEntry.putInt(CATALOG_END_MAGIC);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort(DISC_NUMBER);
            catEntry.putShort((short)catalog.size());
            catEntry.putShort((short)catalog.size());
            catEntry.putInt((int)(archive.getFilePointer() - catStart));
            catEntry.putInt((int)catStart);
            catEntry.putShort((short)0);
            archive.write(catEntry.array(), 0, catEntry.position());
            archive.setLength(archive.getFilePointer());  // truncate if old file
            archive.close();
            def.end();
         * Closes entry in progress.
        public void flush() throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            entryInProgress.close();
            entryInProgress = null;
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(byte[] b) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b);
            def.setInput(b);
            while(!def.needsInput())
                deflate();
         * Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
        public void write(int b) throws IOException{
            oneByte[0] = (byte)b;
            crcAcc.update(b);
            write(oneByte, 0, 1);
         *  Standard write routine. Defined by {@link java.io.OutputStream}.
         * Can only be used once openEntry has defined the file.
         * @param b  Bytes to write
         * @param off Start offset
         * @param len Byte count
        public void write(byte[] b, int off, int len) throws IOException{
            if(entryInProgress == null)
                throw new IllegalStateException("Must call openEntry before writing");
            crcAcc.update(b, off, len);
            def.setInput(b, off, len);
            while(!def.needsInput())
                deflate();
        * Gets a buffer full of coded data from the deflater and writes it to archive.
        private void deflate() throws IOException {
            int len = def.deflate(deflateBuf);
            totalCompressed += len;
            if(len > 0)
                archive.write(deflateBuf, 0, len);

  • Cannot unzip 10g zip file

    Hi,
    I tried to download the 10g zip file for windows but when I try to unzip it I get the message that the zipfile is not a valid archive. I then tried to download the separate components, but with the same result.
    I'm using winzip 8.1
    Cheers,
    Magnus

    Hi,
    It seems like if the partition where the TEMP folder is located isn't big enough, the download fails. The downloaded file becomes the size of available space for TEMP.
    The strange thing is that the download says 576 Mb (or something), and there is no error, but the file becomes only 270 Mb (in my case).
    After allocating more room for TEMP the download worked fine.
    Cheers,
    Magnus

  • How to unzip and zip files

    I have a very large number of Karaoke music that plays on my windows pc but some will not play on my Mac. I think i need to unzip & re-zip them to play on my mac but i'm not sure exactly how to do this. any suggestions? Do I need a special program? running os x 10.9.3

    Zip files can be opened with the built in 'Archive Utility' application. Double click any zip file & it will try to unzip it.
    This application is tucked away inside /System/Library/CoreServices/Archive Utility.  If you want to set preferences for it you need to open the location in Finder by using the 'Go Menu > Go to Folder…', enter /System/Library/CoreServices/ for the path & then open the Archive Utility application and look in it's preferences.
    I expect that zipping & rezipping will not do anything useful for you. I suspect that the file format is the issue.
    Unzip some files & post what the Finders 'File > Get info' panel shows, take a screenshot of it with 'cmd+shift+4', then drag the crosshairs to select the area. it will appear on the Desktop for uploading here.
    You may need to find a compatible player or find a way to convert them if the Mac cannot play them.
    P.S. to zip a file(s) select the items & right click, select 'Compress x items' & you will get a zip archive - I don't think it will help you though

Maybe you are looking for

  • Problems with freeTTS

    Hi all, I imagine this will be a simple one to solve, but unfortunately it has foxed me for a couple of hours. I have downloaded the freeTTS package and I have been trying out the demo's that are included. I can get them to run fine from the command

  • DW8 Background problem

    Hi! I can't position the gif. for a background image on my index pg. It keeps going to the upper left corner. Am I missing 'something'? How can I position it just where I need to have it? I have repeatedly tried to resizing the gif in PSCS2 to no ava

  • SPA9000 routing calls outside that should go to a huntgroup?

    In my attempt to try out a special huntgroup configuration for somebody I'm trying to help out, I've stumbled upon this problem: I've set up a huntgroup as follows 85:name=Test,50,55,hunt=ne;6;3,cfwd=aa However, calling 85 from one of the phones does

  • Party Shuffle and Videos

    Hello I generally use Party Shuffle all the time when listening to my music collection. Sometimes, though, videos are included in the shuffle - I have imported *.mov files into iTunes, and none of them are music videos. Does anyone know if there is a

  • X6 Firmware limbo

    I have the Nokia X6-00 16GB RM-559 I have firmware version 20.0.005 but I heard v30 came out recently (possibly something about v31 but not sure). I'm just wondering when will the update come to my phone? I'm pretty sure I'm about 3 versions behind n