How to unzip a zip file within another zip file

I've got code that successfully processes a file within a zip file.
But now the zip file can also contain other zip files. How can I
process a zip nested within a zip without actually extracting the
files? It looks like I need a ZipFile object to be able to take
advantage of the zip classes for reading zip entries. But the
ZipFile methods want as an argument an actual file, as opposed
to some object in memory. I can read the 'inner' zip file into a
ZipInputStream object, but then how do I make that available for
processing as a ZipFile? I've searched all over and cannot find
anything anywhere that talks about working with nested zip files.
Does anyone have any sample code that does this? Thanks!

I have successfully done it.
You cannot have the code - it is proprietary.
However here are a few pointers:
o Use ZipStreams rather than ZipFile.
o ZipStream is just a filter on a stream, so you can have a zipstream open, read a ZipEntry, then ask for a substream for the stuff up to the next ZipEntry. Put a second ZipStream on that substream.
o As I recall you have to watch out that your inner ZipStream does not do a close. (Everything will get closed.) Instead, there is another ZipStream method that will close without closing all the underlying streams.
Hope this helps.

Similar Messages

  • How to call swf file within another swf file using xml

    hii,
    I am facing some problem to call a swf file via xml when this xml file loaded it calls another swf file which includes a new xml file. now if i call this nested swf calling without xml it works but in case case of xml it is not showing the result. i m confused. how to nested xml file calling done in as2/as3. i need some logics. thanks in advance

    This is the AS3 forum and your posting involves AS2 code.  You should repost in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    Aside from that, your problem might lie in the following lines...
    _root.createEmptyMovieClip("sub_container1", 1);
    loadMovie(sub_SWFPath[1].attributes.url, "sub_container1");
    You create the new movieclip, sub_container1,  in the _root, but you do not assign the loadMovie to load into that same movieclip (unless you have a _lockroot = true assigned in your sub-swf).  In any case, you should repost in the AS2 forum to pursue resolution.

  • Is it recommended to link an illustrator file within another illustrator file?

    Considering best practices for design reproduction... and that the linked file will contain a linked photoshop image.

    I believe once you link an image, wherever it goes goes the image, too.  Things get dicey when you move the image from where it was linked from, but if you have not moved the image and it shows it is still linked in the Links palette of the first Illustrator file ( which is placed into a new Illustrator document ), then the image remains linked.  So, to answer your question, no need to link again in the second file ( unless the link was somehow broken ).

  • How to read/unzip a specific file within a zip file

    Hi,
    I have a file within a zip file that contains a timestamp - I want to read this timestamp and then create a destination directory for the remaining zip files to be unzipped into. Since I know the name of the file with the timestamp in it I thought I could create a zipfile and use getEntry to get the entry but then other than getting the size and name of the file I can't do much more with it like read it unless I use a stream (zipinputstream) instead of a file (zipfile) - do I have this right?
    Does this mean to get the content I would have to loop through possibly all the files using the stream until I come across the one I want - then get the timestamp and loop through them all again to write them to the destination directory? Or am I reading this wrong - seems a bit round about.
    Any suggestions would be greatly appreciated.
    Thanks

    this works though - and you don't have to loop through all the files - just use the ZipFile:
    ZipEntry ze = zipfile.getEntry("path/to/file");
    BufferedReader br = new BufferedReader(new InputStreamReader(zf.getInputStream(ze)));
    line = br.readLine;Thanks!

  • How to load swf files within another SWF and still maintain actionscript

    Hi I was wondering how to embed an swf file inside another
    swf file, If i simply import it to the stage or the library it will
    become a symbol but the actionscript interactivity is lost, another
    question is can I have an actionscript 2 file play within an
    actionscript 3 file?
    The actionscript 2 code for embedding is something like this:
    don't mind the _mc titles
    this.cargame_mc.onRelease = function (){
    loadMovie ("Crusty Rusty's.swf", empty_mc)
    empty_mc._xscale=60;
    empty_mc._yscale=55;
    empty_mc._x=210;
    empty_mc._y=140;
    Please Help its for my uni portfolio, i want to use as2, but
    if i do i would lose the 3d possibility of as3, is there any way to
    export an as3 file and then embed in as2, using a program or
    anything? Thanks!I
    I would just like to say thanks in advance because everyone
    on here is so helpful!

    you can load an as2 file into an as3 file (using the loader
    class) and the actionscript will work in both.

  • How can I copy layers from one .fla file to another .fla file?

    Hi,
    How can I copy layers from one .fla file to another .fla file? Please do help.
    Thanks.

    Select all the frames you want to copy, right click and select copy frames then select the file you want to paste them into and right click again and then paste frames.
    The layers the frames are should come across with them.

  • How do I create a table within another table?

    How do I create a table within another table?
    As shown in image below (document created with Words), I already have a table with 3 columns. How do I create another table with 6 columns to tabulate the data (the one below "3.1 Overall")?

    Last time I checked in Pages 5.5.2 that is not possible.
    Peter

  • How can I insert a completed file into another PDF file I am developing?

    How can I insert a completed file into another PDF file I am developing?

    Please refer : http://acrobatusers.com/tutorials/how-to-insert-a-pdf-into-a-pdf

  • Call a external SWF by press the button within another SWF file but the second SWF file play Externely

    Hello Guyz.
    i am working on Macromedia Flash 8 and i just want to call a external SWF when i press the button within another SWF file.......but the second SWF file play Externely............can any one knows the code.... AS2

    try this
    http://www.actionscript.org/forums/showthread.php3?s=&threadid=28123

  • How to refer an xml file within a xml file?

    Hi
    I would like to refer a xml file within a xml file from where i would like to extracts some elements & attributes.
    Plz, suggest me hot to do.
    Thank you.

    You mean you want to link the file thru some resource pointer and then make the external file availabe for parsing and other processing operations?

  • How to Include a ZUL file in another ZUL file

    Hi
    I need to Include a ZUL file in another ZUL file
    which is not in same JAR. Both are in different JAR.. but i want to Include that...!
    Thanks...!

    You want to include a ZUL file, whatever that is, that's in one JAR inside another ZUL file that's in another JAR? I don't even understand the question. Get it out of the first JAR and include it inside the 2nd ZUL file ???

  • Pages Importing from pages file to another pages file

    Is it possible to Import from a separate pages file to another pages file
    IF so HOW?????

    Tulse, I'm using Pages 2 too. The first thing I'd tried this on had only a simple drop cap in a text box, fixed on page. That didn't copy - or at any rate didn't paste. The text box had been sent back to overlay it with inline spaces to clear the capital. These reproduced, but the capital didn't. Neither did kerning or baseline adjustments, nor my inserted guides for "leading" the text to the same depth on every page
    Also page set-up details were not transferred in this way: i.e., if you change the margins in a template (even the blank one) the margins don't transfer. Logical enough, page set-up belongs to the document, not the section.
    Looking at this again, in the Extreme Newsletter template, imported graphics transferred, and inserted text transferred, but layering and placement information did not. I'd made my own pages by altering this, generally using text boxes or shapes to compose picture pages rather than using those in the template. But the copied and pasted sections were all over the place.
    So it may be the case that if you're copying from a section to a document with identical layout, page set-up & etc. to the one you're copying from, the result will contain most of the content. But the layering, placement on page of fixed objects, etc., would seem to be decidedly iffy.
    I've tried it on title page sections, where the info in fixed text boxes copied, but neither their placement nor relative placement, and (in the newsletter template) with both my own and the provided sections, with no consistent results. If it works in some cases, then that would be handy.
    It's easy enough to try, and undo if it doesn't work.
    But it's certainly no subsitute for being able to insert one Pages document into another; nor even always bits of it. I'd be inclined to conclude that copying and pasting in this way uses something less than the full Pages file format.
    Cheers.
    iBook G4   Mac OS X (10.4.7)  

  • Executing .jar files from another .jar file.

    How would I run one .jar file from another .jar file. and is there anyway to call specific class arguments? Because I have one .jar file that reads a specified file and returns its contents.
    So how would I execute it and specify its arguments and how would I make it return something to the executing jar file?

    Because I have one .jar file that reads
    a specified file and returns its contents. Presumably you have a class that does that, and you have that class stored in a jar. And you want to know how to... um... do something with that class. I say "um..." because normally you don't execute a class, either, you either call its static methods or you create an instance of the class and call its instance methods.
    If you have been writing a whole lot of little classes each of which just has a static main method, then stop doing that. Write real Java classes instead. The tutorial is here:
    http://java.sun.com/docs/books/tutorial/java/index.html

  • Move group of pages from one InDesign file to another InDesign File using VB.Script

    Dear team,
    I am trying to move group of InDesign pages from one indesign file to another indesign file using vb.script.
    I have written the code like
    Dim Pages=IndDoc.Pages
    Dim Mytype=TypeName(Pages)
    Pages.Move(InDesign.idLocationOptions.idBefore,IndDoc1.Pages.LastItem)
    but it is giving an error as method Move is not a member of Pages 
    please give mme the solution to move the Multiple pages or a group of page from one Indd to another Indd.

    Hey Peter, if I wan to move several page that part of Auto Flow text, I checked the "delete page after moving" but the content still there, not deleted.
    Is there any way to delete it automatically, just to make sure I have moved that autoflowed page?

  • Trying to compile a .java file from another .java file

    Hello,
    I'm trying to compile a .java file from another .java file using Runtime.exec...
    String c[]=new String[3];
    c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
    Process p=Runtime.exec(c);
    If anyone can help me in atleast getting the command prompt when Runtime.exec("cmd.exe") is executed...that would be great...I tried out notepad.exe, calc, explorer instead of cmd.exe...all the commands display their respective windows..except cmd.exe...the command prompt doesnt appear...
    Please help me ASAP....
    Thanks for your help in advance...
    Regards.
    AKhila.

    try this. ur code will be compliled and will get .class file. but console won't appear. is it a must for u?
    public class Exec{
         public static void main(String a[]) throws Exception{
              String c[]=new String[3];
              c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
              Process p=Runtime.getRuntime().exec(c);
              // or Runtime.getRuntime().exec("javac Hello.java");

Maybe you are looking for

  • OLE automation To Print picture in word document

    We are upgrading from 4.6c to ECC 6.0.One of Our OLE automation Report is used to launch the word document to print CV and photo.But the program acts differently to the different Presentation servers even though they all have the same GUI and word ve

  • Issues in using Jdev web service proxy

    Guys, I'm using jdeveloper web service proxy to call web services. But when i got the response, the response objects are not getting populated for complex type. I mean if the schema refers to another element name instead of primitive type. Do anyone

  • Integration with SAP - Comparing SAP XI with other EAI Middlewares

    I highly appreciate if you could throw some of your expertise and insights to the following: 1. What are all the architectural advantages if we use SAP XI instead of using other integration middlewares such as SeeBeyond, WebMethods etc. 2. Most of th

  • Differences between solaris Intel and solaris Sparc

    Hi, I'm new to this solaris world. But I've been using other flavour of unix. I just wondering if somebody could explain to me the differences between Intel version and Sparc version, please? If you have any website that explain it all would be great

  • Flickr renamed my photos in iPhoto how do i prevent that

    Flickr renamed photos in iPhoto that I renamed in Flickr. How do I prevent that and how do I fix it?