Zip/unzip problem

I have a problem unzipping Objects that i've zipped earlier.
The situation is as follows:
a RMI server zips a tree of Objects. The client side of the program tries to unzip the data and form it back to the Object (a DefaultMutableTreeNode) that is should be. However...
The zip part goes without any problems. The unzipping however gives me a StreamCorruptedException.
I have an object called ZipObject and it contains the size (int) of the zipped data and the size (int) of the uncompressed data. It also holds the data itself.
my zip/unzip methods are as can be seen at:
http://www.next-element.nl/~orchid/zip.html
if anyone can help me...i'd be very grateful.
thanx in advance.

Oh yes i checked the ingoing and outgoing size of bytes...
they are perfectly the same.
The problem lies more in the in.readObject() method.
when i dump the bytes that i receive to a File (which i do not want to do in the application) i can actually unzip it with unzip from my Linux system! But in my app. i don't write the objects to file...i just need the object back. but the data comes in clean.

Similar Messages

  • Zip/unzip desing and configuration

    Hi,
    I need to implement zip/unzip file to file scenario . can u help me complete design and configuration steps .I mean how to deploy java code. and designing in IR and how to configure in ID.
    thanq
    krishna

    Hi,
    You Do not need to Provide any JAVA Code For the same.
    SAP Provides Standard Modeules to DO so.
    Use the PaYLoadZipBean module.  
    Have a look at the SAP help link:
    [http://help.sap.com/saphelp_nw70/helpdata/en/45/da9358a1772e97e10000000a155369/frameset.htm]
    just a Few Points to remember:
    1. Place this  Before the call to Standard SAP module in case you want to Unzip the payload in the Sender Side
    2. Place it after the SAP Standard module in the receiver side.
    Hope this helps.
    Reward points if useful
    Regards,
    Abhishek

  • Zip/unzip API for both Windows/Linux

    hello, there:
    I wonder if it's possible that we can create a zip/unzip class that can package the files in Windows and unzip them in Linux?
    Fact is, that I created a Swing application, which shows a tree of a certain folder. Upon request, the app also zip that folder(including it's subs) and upload it to a remote database as a SQL blob. Well, I want this app to work on both Windows/Linux, meaning when it runs on Linux, it should be able to download the package and unzip the package to its full extend.
    But it looks like that the files zipped in one OS can't be easily unzipped to its original in another. Is it doable or not possible due to the very different nature of the file systems of different platform?
    I used a open source code from this link, http://www.wakhok.ac.jp/~tatsuo/sen97/10shuu/UnZip.java.html
    Will the zip package from jdk help (java.util.zip)? I haven't tried that one yet.
    Thanks,
    Sway

    You don't have to use special libraries as the tools you need are all in the java.util package.
    There is however an Apache Commons library for this though which you can find here
    http://commons.apache.org/sandbox/compress/
    Note that zip = archiving and compression where as gz or gzip on Linux is only compression and you would use tar to do the archiving (tar.gz), that's why there are two separate compression classes in the Java API.

  • Zip-Unzip

    New to Mac. Is there a file compressor/decompressor that comes with OS X? If not, any recommendations for an open source/freeware/shareware or inexpensive version? I need to compress as well as decompress.
    Thanks,
    Eric Weir
    Decatur, GA USA

    Thanks, Duo. New to Mac, but I always get a quick response here.
    The file I was working with was an extension for Thunderbird. When I did the double-click/right/click thing on it, I was given the option of "Compress." I expected "Uncompress," but I said, "Oh, what the ****." Sure enough, I got a zipped file. With it I got an "Uncompress/Unzip" option, which gave me what I wanted. The original file unzipped. I don't understand the logic, but it worked.
    Cool that Mac has zipping/unzipping built-in. Of course, since it makes sense.
    Thanks again,
    Eric Weir
    Decatur, GA USA

  • File-roller should have zip/unzip depedency

    I have gnome installed and tried to open a zip file using file-roller.  It did not work because the zip and unzip packages were not dependencies.  The  ubiquitous nature of the zip standard should make it a dependency on any file compression utility like file-roller.  Just my humble opinion.

    I don't agree. Zip is not very common in linux. File-roller can handle it, if zip / unzip is installed, but literaly it does not really "depend" on it. For my taste, it is clear and simple: If you need another additional compression utility, next to the commonly used and installed (tar) you may install it (zip, unzip, bzip, ...). It should'nt just because you decide to use file-roller. Keep it simple does not mean install everything a user might want, as f.e. ubuntu would do.

  • Recommended zip/unzip utility

    Can someone recommend a good zip/unzip program for the Mac – one that will allow me to unzip password-protected (encrypted) zipfiles that were originally created on a PC?
    (One that’s freeware would be particularly welcome.)
    Thanks.

    I have no idea what going on. Did you launch the Terminal.app in /Applications/Utilities/? If so, if you type the following in the window that pops up and hit the return key:
    unzip
    you should get:
    $ unzip
    UnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler. Send
    bug reports using http://www.info-zip.org/zip-bug.html; see README for details.
    Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
    Default action is to extract files in list, except those in xlist, to exdir;
    file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).
    -p extract files to pipe, no messages -l list files (short format)
    -f freshen existing files, create none -t test compressed archive data
    -u update files, create if necessary -z display archive comment
    -x exclude files that follow (in xlist) -d extract files into exdir
    modifiers: -q quiet mode (-qq => quieter)
    -n never overwrite existing files -a auto-convert any text files
    -o overwrite files WITHOUT prompting -aa treat ALL files as text
    -j junk paths (do not make directories) -v be verbose/print version info
    -C match filenames case-insensitively -L make (some) names lowercase
    -X restore UID/GID info -V retain VMS version numbers
    -K keep setuid/setgid/tacky permissions -M pipe through "more" pager
    Examples (see unzip.txt for more info):
    unzip data1 -x joe => extract all files except joe from zipfile data1.zip
    unzip -p foo | more => send contents of foo.zip via pipe into program more
    unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
    That's the short version. For the long version, type in the following and hit the return key:
    man unzip
    If you didn't type these in the Terminal.app window, I have no idea what you're doing.

  • Unzip problem for psoracle816nt.zip (PO8i)

    i downloaded psoracle816nt.zip (Personal Oracle 8i) to install on my win2000 machine. when i tried to unzip the file with WinZip, it told me that the file may be corrupted and to dl it again. after i downloaded the file again, i encountered the same problem.
    does anyone know if winzip is the right unzip utility? Thanks, Jason.

    Hii Guys ,one more prb,
    I need to develop a file uploading utility in struts to upload ZIP files(only ZIP), and i sucseeded to do it using the commons.fileupload which comes along with the WSAD5.1(examples), but the prb is i need to chek for the MIME type and need to reject if its not a zip file, if i do this in actionclass, its waiting till the uploading process of the file is finished and finally its displaying file is not the a ZIP, i need to do this validation as the request comes to the server side, i cant not do this in clint side cause my design should not allow me to use any java script..so please let me know is there any way to specify in the controller it self .
    thanx in advance

  • Zip Utils (unzip problem )

    Hi,
    I have a problem with the ZIP, so i an array of bytes ziped in my database without problem,but after when i try
    to extract this information i must to unziped it , the problem is that the unzip method replace the char "�" by
    another char that cause a not well formedness of my xml file produced .
    So if there is any solution to resolve this problem .
    Thanks.

    public static byte[] zip(byte[] input) throws IOException {
    // Create the compressor with highest level of compression
    Deflater compressor = new Deflater();
    compressor.setLevel(Deflater.BEST_COMPRESSION);
    // Give the compressor the data to compress
    compressor.setInput(input);
    compressor.finish();
    // Create an expandable byte array to hold the compressed data.
    // You cannot use an array that's the same size as the orginal because
    // there is no guarantee that the compressed data will be smaller than
    // the uncompressed data.
    ByteArrayOutputStream bos = new ByteArrayOutputStream(input.length);
    // Compress the data
    byte[] buf = new byte[BUFFER];
    while (!compressor.finished()) {
    int count = compressor.deflate(buf);
    bos.write(buf, 0, count);
    try {
    bos.close();
    } catch (IOException e) {
    // Get the compressed data
    return bos.toByteArray();
    public static byte[] unzip(byte[] compressedData) throws IOException {
    // Create the decompressor and give it the data to compress
    Inflater decompressor = new Inflater();
    decompressor.setInput(compressedData);
    // Create an expandable byte array to hold the decompressed data
    ByteArrayOutputStream bos = new ByteArrayOutputStream(compressedData.length);
    // Decompress the data
    byte[] buf = new byte[BUFFER];
    while (!decompressor.finished()) {
    try {
    int count = decompressor.inflate(buf);
    bos.write(buf, 0, count);
    } catch (DataFormatException e) {
    try {
    bos.close();
    } catch (IOException e) {
    // Get the decompressed data
    return bos.toByteArray();

  • Problem with zip/unzip of .swf files in XP

    For some reason, zipping a .swf file in XP and then unzipping on another XP machine, the file suffix changes from ".swf" to no suffix and properties change from Flash movie to Flash object.  Consequently, linking to the file with a URL in a presentation causes the file not found error. Renaming the unzipped file to filename.swf makes it unreadable.
    Any suggestions on how to compact .swf files without them being corrupted when they're unzipped?

    Sorry to say, aknle, I use Illustrator files in every After Effects project I do these days. I have never had the issue you are describing. I often receive files form external artists that I need to change to RGB from their CMYK originals. I often need to fix their art because they are print people and think of white as the paper and the absence of ink. But the files open and track and update for me flawlessly. Always have.
    I am on CS5 (not 5.5) using a Macintosh.
    bogiesan

  • Zip Exception Problem using jeode to unzip file

    Hi,
    I am using a JAva application, that has a client running on the IPAQ-Jeode JVM and the server is on JDK 1.3.
    The application is using RMI to communicate between the Server and the PDA. The application code is running on JDK 1.3. Once the RMI communication is established, the server (during deployment) creates a ZIP file The zip file is serialized to the client machine (in this case, the Ipaq). The Client code later, running on Jeode, tries to unzip this file and extract the files.
    We observed that the files created by the server (on JDK 1.3) cannot be unzipped by the Jeode JVM and gives an Zip Exception. The same zip file can be successfully uncompressed by machines having Sun's J2SE versions JDK 1.3 and JDK 1.1.8(which is compatible with PJava).
    The exception which I receive is
    2002-02-28 12:05:37,194 [Thread-0] INFO com.op40.utl.LogStream - java.util.zip.ZipException
    2002-02-28 12:05:37,213 [Thread-0] INFO com.op40.utl.LogStream -      at java.util.zip.ZipInputStream.read (bytecode 305)
    2002-02-28 12:05:37,234 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.java.util.InputStreamToOutputStream.copy (bytecode 54)
    2002-02-28 12:05:37,879 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.java.util.FileToStream.copy (bytecode 71)
    2002-02-28 12:05:37,895 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asset.FleAad.setPayload (bytecode 124)
    2002-02-28 12:05:37,913 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.immediateDeploy (bytecode 141)
    2002-02-28 12:05:38,000 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.immediateDeploy (bytecode 28)
    2002-02-28 12:05:38,020 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.scheduleDeployment (bytecode 91)
    2002-02-28 12:05:38,037 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.deployer.Adp.deployAssets (bytecode 17)
    2002-02-28 12:05:38,632 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.client.CdaImpl.processAssets (bytecode 33)
    2002-02-28 12:05:38,652 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asttpt.PtpAstRcv.processAssets (bytecode 82)
    2002-02-28 12:05:38,669 [Thread-0] INFO com.op40.utl.LogStream -      at com.op40.dis.asttpt.PtpAstRcv.access$900 (bytecode 3)

    Is your client running as an applet or application? I have a client applet that tries to connect to my RMI server, but I keep getting the following exception even though java.rmi.registry.LocateRegistry is in the /Windows/lib/core.jar.
    java.lang.NoClassDefFoundError: java/rmi/registry/LocateRegistry
    at java.rmi.Naming.getRegistry (bytecode 12)
    at java.rmi.Naming.list (bytecode 6)
    Test.init (bytecode 6)
    com.insignia.applet.AppletPanel.run (AppletPanel.java, line 0)
    java.lang.Thread.run (bytecode 11)If you have any suggestions, that'd be great. You can contact me at [email protected]
    Thanks,
    Eric

  • PHP 5.0.4, php apps and zip file problems

    I use various opensource web apps that allow for files to be uploaded in zip format. The app then unzips the files and does what it needs to do with them. ie: Gallery2 uploading photos that are zipped up and placing the enclosed photos into the gallery.
    Anyway, this was working very well with the base install of OS X Server's PHP4.? and Apache 1.4.3
    I upgraded to PHP 5.0.4 using Entropy PHP (recommended by another OS X Server admin). Anyway, I lost the ability to handle the zip files. I am unsure what to look for.
    phpinfo() shows the following about compressed files:
    Configure Command
    './configure' '--prefix=/usr/local/php5' '--with-config-file-path=/usr/local/php5/lib' '--with-apxs' '--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr' '--with-mysql=/Users/marc/svn/entropy/php-module/src/mysql-standard-*' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-libxml-dir=/usr/local/php5' '--with-xsl=/usr/local/php5' '--with-pdflib=/usr/local/php5' '--with-pgsql=/Users/marc/svn/entropy/php-module/build/postgresql-build' '--with-gd' '--with-jpeg-dir=/usr/local/php5' '--with-png-dir=/usr/local/php5' '--with-zlib-dir=/usr' '--with-freetype-dir=/usr/local/php5' '--with-t1lib=/usr/local/php5' '--with-imap=../imap-2002d' '--with-imap-ssl=/usr' '--with-gettext=/usr/local/php5' '--with-ming=/Users/marc/svn/entropy/php-module/build/ming-build' '--with-ldap' '--with-mime-magic=/usr/local/php5/etc/magic.mime' '--with-iodbc=/usr' '--with-xmlrpc' '--with-expat-dir=/usr/local/php5' '--with-iconv-dir=/usr' '--with-curl=/usr/local/php5' '--enable-exif' '--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp' '--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring' '--enable-calendar' '--with-bz2=/usr' '--with-mcrypt=/usr/local/php5' '--with-mhash=/usr/local/php5' '--with-mssql=/usr/local/php5' '--with-fbsql=/Users/marc/svn/entropy/php-module/build/frontbase-build/Library/ FrontBase' '--enable-openbase_module'
    Registered PHP Streams
    php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps
    BZip2 Support Enabled
    BZip2 Version 1.0.2, 30-Dec-2001

    I wish I could be as optimistic about your configuration, you have/had more than two issues, even after building a PHP that would work for you it had to be reconfigured to obtain optimal performance.
    I noticed other errors in your logs but since they weren't specifically related to your issue with zip or PHP running properly I place a low priority on them and ignored them.
    I eventually found the build issue with the entrophy PHP however Mark wasn't interested in the fix since it basically performed the majority of the tasks that were expected and everything else was considered experimental with no real support provided.
    You did get a better PHP built in the ADE (Apple Developer Environment) targeted specifically for your CPU (although they are universal binaries) and I included some modules I wrote myself that provide some (IMHO) key functionality for a production web service like scanning uploaded files for viruses and the ability to generate RRDTool graphs natively without slowing the process down by having to rely on external resources.
    While I have thoroughly tested the modules I wrote, I have not had the time (or the help) to write proper documentation for them so I might later provide some sample PHP scripts since they are fairly simple to implement.
    The biggest problem I saw was that you had a lot of nice toys but none of them were designed to work smoothly together and the entrophy PHP is a good alternative for someone who needs more than what apple provides but isn't capable of generating something that integrates well in the environment.
    Also to note, the entrophy (or Server Logistics) PHP is an all-purpose/general-purpose solution and isn't ever going to be optimal for any specific architecture due to the build process which is why the one I provided works significantly better, it was built specifically for both architectures individually then combined into a single binary giving you the ultimate performer for either architecture without sacraficing performance or degrading functionality.
    I tend to use as much Apple provided software as I can since it makes no sense to me to build and install any software that is already available and built specifically for the environment other than to waste disk space, freetype is a good example, any that is provided will never include the same features and functionality as the apple provided installation yet all PHP makers seem to build the basic bare-bones freetype and build their PHP off of it expecting to achieve the same feature-rich functionality which it clearly isn't capable of.
    They also include a lot of features which are never used and I have removed and/or substituted some of these in an attempt to provide a more usefull set of features and functionality and I include a very complete pear installation which also contains just about every feature and functionality you would ever require without providing anything that that would be considered fluff.
    I've been watching the performance of the installation for a couple of days now and I'm more than satified that it's a solid performer for you so smile and enjoy, santa was nice to you this year.

  • Unzipping problems

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Server name
    - Filename
    - Date/Time
    - Browser + Version
    - O/S + Version
    - Error Msg
    After downloading Oracle 9i I was unable to unzip the files, for they have not been recognised as legal zip archives.

    Please try unzipping the content to a folder location with less character length say c:\Champs\CS4WP 
    Current folder length C:\Documents and Settings\Champs\Mis documentos\Adobe CS4 Web Premium   subsequently followed by biggest folder length inside the zipped content might be creating the problem here.
    regards
    Aj

  • Unzip problem

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    Downloaded the following files last night, 5/16/02.
    9011NTSrv_Disk1.zip
    9011NTSrv_Disk2.zip
    9011NTSrv_Disk3.zip
    WinZip cannot unzip any of them.
    Error message is: "Cannot openfile: it does not appear to be a valid archive."
    Tried PKUnzip from a dos prompt on 9011NTSrv_Disk3.zip.
    Error message is: "Warning! I don't know how to handle: readme.txt"
    I'm running W2K.
    - Server name
    - Filename
    - Date/Time
    - Browser + Version
    - O/S + Version
    - Error Msg

    Oh yes i checked the ingoing and outgoing size of bytes...
    they are perfectly the same.
    The problem lies more in the in.readObject() method.
    when i dump the bytes that i receive to a File (which i do not want to do in the application) i can actually unzip it with unzip from my Linux system! But in my app. i don't write the objects to file...i just need the object back. but the data comes in clean.

  • BT cloud zipped files problem

    Hiya there
    I have encountered a really strange problem on my BT cloud storage I first noticed it after zipping some pictures on my computer and uploading the zipped file, then trying to share them, I get this message.
    Now I know for a fact nothing is DRM protected, I uploaded a few images by themselves (without zipping) and was able to obtain a link to share, but as soon as I zipped the SAME pictures I got the message above ?   Now this only seems to affect my zipped images and not say a zipped .exe file.
    Does anyone have any clues as to why I cannot share zipped pictures .. note they are all mine, taken my me, zipped by me and none have any DRM attributes (as proved when uploaded as a single unzipped file)
    Looking forward to any hints as to why this may be
    Z
    Solved!
    Go to Solution.

    ZooBurner wrote:
    Hiya there
    thanks for your reply, I have suspected something like you suggested but i don't find any of the properties you suggest under the security tab..that being said I dont realy understand the way Windows 7 security permissions work at all.  I was using a standard account so i logged onto the admin account zipped the files and uploaded, same result though.
    I have succesfully shared the file via uploading it to my webspace and dropbox both were very easy and worked well, so if it is a  permissions thing then its not a universally applied or enforced one !!
    I do thank you for your time though and will continue to work on this one, I'm wondering if it is a permission that is applied at the BT Cloud end ?
    PS I have also succesfully shared the same file via Onedrive and Googledrive !!
    Many thanks
    Z
    This may help the situation and lead towards a solution:-
    The problem may well lie with the BT Cloud software. It could be just a quirk with FSecure.
    The attribute"wmpnetworksvc"  I had mentioned is not there in the security properties of the .zip file, and must be added.
    If you view the file listing in "My Pictures" folder, or wherever it's held, then select the option "Share With" and then progress to "everyone". Then that attribute is added to your .zip file.
    You will note that if you check the properties of a normal .jpeg file that the atttribute "WMPNetworkSvc" is already there, (as a read only file).

  • Odf-converter, mono and unzip problems

    Hi, I'm having problems getting the odf-converter from the AUR to work. Seems it's some kind of problem with the unzip. I have the listed dependencies installed (libzip, glib2). Am I missing some settings, do need to setup my Mono install somehow (all I did was pacman -S mono)? Or is it a bug in the source packages?
    Here's the output I'm getting:
    ogi@ogi-laptop:~$ odf-converter some_doc.xlsx /LEVEL 1
    [INFO][some_doc.xlsx] Converting file: some_doc.xlsx into some_doc.ods
    [ERROR][some_doc.xlsx] Conversion failed - Error during conversion
    [DEBUG][some_doc.xlsx] unzOpen( at (wrapper managed-to-native) CleverAge.OdfConverter.OdfZipUtils.ZipLib:unzOpen (string)
    at CleverAge.OdfConverter.OdfZipUtils.ZlibZipReader..ctor (System.String path) [0x00000]
    at CleverAge.OdfConverter.OdfZipUtils.ZipFactory.OpenArchive (System.String path) [0x00000]
    at CleverAge.OdfConverter.OdfConverterLib.ZipResolver..ctor (System.String filename) [0x00000]
    at CleverAge.OdfConverter.Spreadsheet.Converter.CheckOoxFile (System.String fileName) [0x00000] )
    Done.

    Resurrecting this old thread on purpose.
    Did anybody ever solve this? I'm the owner of the odf-converter AUR package, and I just tried to actually use it for the first time. It's now on 3.0, and was no newer than 2.0 when the above posts were written. I'm surprised that it still fails the same way.
    I wonder if this is a 64-bit problem. The zip code in the source package is shipped as a 32-bit Windows binary. Can somebody verify?
    Can somebody at least explain what the error says? I'm unfamiliar with Mono and have only the most basic C# skills.

Maybe you are looking for