I assume you're using GaeVFS (http://code.google.com/p/gaevfs/)?
Basically, you need to create a java.util.ZipInputStream instance to
read the zip file.

GaeVFS implements a file system API based on Apache Commons VFS
(http://commons.apache.org/vfs/). To open an InputStream for a file
using GaeVFS do the following:

    FileSystemManager fsManager = GaeVFS.getManager();
    FileObject zipFileObject = fsManager.resolveFile(
"/path/to/myZipFile.zip" );
    InputStream in = zipFileObject.getContent().getInputStream();

Now you can create a ZipInputStream to read the file:

    ZipInputStream zipIn = new ZipInputStream( in );

If you're so inclined, you can reduce this all to:

    ZipInputStream zipIn = new ZipInputStream( GaeVFS.resolveFile(
"/path/to/myZipFile.zip" ).getContent().getInputStream() );

Don't forget to close the ZipInputStream when you're finished with it.

See the following for more information:

    http://code.google.com/p/gaevfs/wiki/UsingGaeVFS
    http://code.google.com/p/gaevfs/wiki/CombinedLocalOption
    http://code.google.com/p/gaevfs/wiki/ApplicationPortability

Vince

On Fri, Oct 23, 2009 at 5:09 AM, deft <somondig...@gmail.com> wrote:
>
> once I have uploaded a zip file onto the GAE Virtual File System, how
> do I access the zip entries. am really stuck here. could someone help
> me out?!
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to