Reading a Compressed File from a ZIP File, which is an entry of ZIP File

Hello, Experts,
Would it be possible somebody to help me with code example for the following problem?
I want to read a compressed file from a ZIP file, which is an entry of ZIP File, without extacting/writing files on file system. Is this possible?
Lets say we have a ZipFile1. There is ZipFile2 inside ZipFile1. And inside ZipFile2 is FileA. The scenario is reading FileA without extracting on file system.
Thank you in advance for your help.
Cheers
RADY

The classes you want to be using are java.util.zip.ZipInputStream and and ZipEntry from the same package. Construct the ZipInputStream with the input you have for the outer zip. Loop with ZipInputStream.getNextEntry until you find the inner zip you're looking for - that method returns a ZipEntry, and you get the name of the zip entry with ZipEntry.getName. Read the ZipInputStream from that point into some buffer, and read that buffer into a new ZipInputStream - rinse and repeat until you have the contents of the file in the zip in the zip...

Similar Messages

  • How do i copy files from my macbook pro to my hard drive? These files were previously started on my old dell.

    how do i copy files from my macbook pro to my hard drive? These files were previously started on my old dell.

    More then likely that external drive is formatted the Windows NTFS format which Mac OS X can Read but it can not Write to that format. So you would need to copy all the data off that drive, to either a Windows PC or to your Mac, thenn use the Mac to format it for the Mac OS. Which would be Mac Extended (Journaled) with a Partition Table of GUID.
    If you want to use that drive on both Mac and PC then you would need to format it either FAT32 or exFAT.

  • When copying raw files from Extreme IV card to hardrive, finder copies a few files then exits task and wipes the card clean of all images.

    When copying raw files from Extreme IV card to hardrive, finder copies a few files then exits task and wipes the card clean of all images.  Have tried new card and card-reader to no avail.  Have done this many times on other macs with no problems.
    Can edit files off the card, in CameraRaw, prior to 'copying' them, ie can 'save as' to the hard drive, so files seem okay on card, before I try to copy them using copy and paste.
    Running OS 10.8.3 on a new macbook pro.

    Rita,
    The process for determining what is causing the files to be corrupt can be a tedious one depending on the following:
    1. Can you review the images on your camera's LCD screen without problems? If not then the problem is most probably either a corrupted/faulty memory card or a faulty camera. If this is the case then your best bet at recovery (of sorts) is to use a program such as BrezzeBrowser from BreezeSys to extract the embedded jpeg versions of the corrupted RAW files from within each RAW file. Chances are, you won't manage to actually repair the corrupted RAW file but the jpegs are better than nothing.
    2. If the images review ok on your camera but are corrupted when viewing on your computer and there seems to be no other problem with other files on your computer then it may be either a faulty card reader or usb/firewire cable between the card reader and the computer that is the culprit. Try the card reader with a different cable and also try a different card reader to determine the cause of the corruption.
    3. If your symptoms are that you get different files corrupting over time when viewing them on your computer then the problem may be any one of either failing RAM memory, hard disk, hard disk controller or IDE/SATA hard disk cables. This is where the troubleshooting can be pretty tedious testing then eliminating each item from the list of suspicious pieces of hardware. Try the card and card reader on an altogether different computer to see if the files transfer correctly to that computer. If so then the problem lies with your computer hardware. If you haven't already done so at this stage, backup all your important data immediately (hopefully you keep backs anyway).
    Hope this helps.

  • I installed the InDesign CC Testversion and now i try to open INDD-Files from earlier Version. Always i get the error "This file is made by an earlier Version...." but it´s CC that is the latest Version. What is the problem ? Should i have to convert the

    I installed the InDesign CC Testversion and now i try to open INDD-Files from earlier Version. Always i get the error "This file is made by an earlier Version...." but it´s CC that is the latest Version. What is the problem ? Should i have to convert the files ?

    Adobe has been using confusing version names for at least five years.
    There are now two versions labeled CC, version 9 and version 10 (also known as CC 2014). Version 10 is the latest, and if you attempt to open a version 10 file in Version 9 that is not fully patched you will get an error message telling you that the file cannot be opened. The latest patch for version 9 should use a cloud-based service at Adobe to convert version 10 files to IDML and allow you to open that.
    I suspect you may be using an older operating system. Version 10 requires that your system runs at least OS X 10.7 or Windows 7 SP1 and if you are not it will not even be offered to you.

  • When I send a pages file from my ipad to my mac i can edit the file but when i try to print it shows blank why

    when i send a pages file from my ipad to my mac, i can edit the file but if I try to print it shows blank and will not print anything

    Is there a reason you are not storing your Pages documents in iCloud?  That would work for both your MacBook and iPad if you choose to use it (assuming your MacBook is new enough to support an OS X version that supports iCloud).
    If you choose this method, any updates you make on one device would immediately be made available on the other (once you close the file).

  • I have a Seagate expansion drive with files from my former pc.  How do I transfer these files to my new iMac?

    I have a Seagate expansion drive with files from my former pc.  How do I transfer these files to my new iMac?

    Drag them to the desired locations.
    (93394)

  • Can LabVIEW download files from the Internet? I know the URLs of the files.

    Can LabVIEW download files from the Internet? I know the URLs of the files.

    Hi bmihura,
    I'm not sure what you what to do - download or open URLs - but I've put together the attached VI.
    I hope it is of some use.
    Charlie Rodway
    Test Design Engineer
    Rolls-Royce Controls and Data Services Ltd
    Attachments:
    WebBrowser.vi ‏21 KB

  • Firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    firefox 7.0 - Can not upload the file from local machine to server...gives "error 404 : file not found"

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • Can I move files from one hard drive to another without replacing/duplicating existing files?

    Long story short, my work purchased a Macbook Pro and copied all of my files from my iMac to my new Macbook Pro. I've had to work on my iMac before my laptop was fully ready and now I need to transfer more files over to my Macbook Pro.
    Is there a way that I can drag contents from my profile folder (documents, downloads, etc.) to my Macbook without have to moving 100+ gbs of information. Basically, is there a way that the computer can recognize that "Folder A" already exists on my Macbook Pro and it will not ask to replace that folder?
    I am sorry of my question is vague; I'll rephrase if necessary.

    Well, if you drag the contents of your "Documents" folder (on iMac) into your new "Documents" folder (on MacBook Pro) for instance, and choose "Do Not Replace" while checking the "Apply to All" box, it will only transfer new items (this does not include updated items). Now if the new items are in folders that exist under "Documents", then you may need to go into individual folders and repeat this process. That's the only way I can think of doing it. I'd hold off to see if anyone else has a better answer. Good luck!

  • Move stickie file from one mac to another, move stickie file from one mac to another, How do I move stickie file from one mac to another

    How do you transfer the stickie data file from one mac to another?

    I think this is the file -
    In (hard drive) > Users > yourhomefolder (the one with the house icon) > Library, look for a loose file named StickiesDatabase
    Copying that file to the same location on the new machine (and replacing the file there now) should move the notes. It is probably a good idea that both machines be running the same OS X version.

  • I am trying to upload my PDF file from my IBooks but its only giving me the option to upload from my pictures/gallery. How do I get it to where I can upload PDF files from my iBook or how do I transfer my PDF files to my pics?

    I am trying to upload my PDF file from my iBooks but its only giving me the option to upload from my pictures/gallery. How do I get it so I can upload from my iBooks or move my PDF files to my gallery so I can upload it?

    I'm having the same issue. I saved a PDF from an email into iBooks. I'm on apple applying for a job but the only option the upload button has is from the Photos file. How ironic right? Luckily I'm in Logistics and not an IT specialist applying for this job! Lol. Does anyone know the fix?

  • Error accessing JSp file from Tomcat4.1.27 at line:-1 in the jsp file: null

    Hi...when I tried to access my JSp file from tomcat 4.1.27 web server, I got the following error message. Can anyone help me out?
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:8: '.' expected
    import java;
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:80: illegal start of expression
    private static java.util.Vector jspxincludes;
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:82: illegal start of expression
    public java.util.List getIncludes() {
    ^
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:280: '}' expected
    ^
    4 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:534)

    You JSP has four compile errors:
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:8: '.' expected
    import java;Invalid import. You need to import a whole package (*) or single class.
    import java; is wrong
    import java.util.*; is right
    import java.util.List; is right
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:80: illegal start of expression
    private static java.util.Vector jspxincludes;
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:82: illegal start of expression
    public java.util.List getIncludes() {Check the lines before these to make sure you didn't leave off a semi-colon, parens (')') or bracket ('}').
    C:\Tomcat\work\Standalone\localhost\Tree\jspfiles\tree_jsp.java:280: '}' expectedYou are missing a closing bracket ('}') somewhere.
    The message about the "line -1" error is the standard message that is always given when there are compile errors in the JSP.

  • How do I move a smart catalogue file from my Vista computer which has LR4 to my IMac which has LR Creative Cloud. Please explain in layman's terms!

    How do I move a smart catalogue file from LR 4 on a Vista laptop to an IMac where I'm using LR CC? Please use layman's terms as I am new to the IMac.

    You might think so. But it's difficult to decide what people mean. You understood the question, I didn't. If you copied the catalog and everything from the old computer to the new one and utilized the old catalog, the smart collections should still be in place. The old catalog would have to be converted to the new format, and you might have to relink missing images. But after that is all done the smart collections should be in place.

  • Why can't I open my RAW files from my Nikon D7000 ?? I can open RAW files from my old Nikon D70's but not my D7000...

    I can't open my RAW files from my Nikon D7000 on Elements 7. The files from my old Nikon D70s open but not my D7000... Any Idea why?

    Not sure what your version of PSE is but if it is PSE13 then you may need to update your product by going to
    Help >> Updates
    This ensures you get the latest updates to support all known cameras in the market.
    Old products may not have the latest updates so you need to use DNG converter for which there is a wonderful video that is self explanatory:
    Hope this helps.

  • I can't able to open the *.log files from the firefox browser and i need to open the file inside the frame

    If i open the log file from firefox browser it is not open and throws an error as
    "The address wasn't understood
    Firefox doesn't know how to open this address, because one of the following protocols (e) isn't associated with any program or is not allowed in this context."

    What type of log file?
    What is the file name?
    What is the file path or URI?

Maybe you are looking for