> To do the first, you would need to wrap a ZipInputStream around in InputStream
> which is reading the contents of the file. You can probably (I haven't tried
> this) get a suitable InputStream from an URL object (do URL objects support FTP
> ?).
Isn't this what I tried in #3 and #4 in my original post? Sounds like
you are suggesting that this should work and perhaps I do need to
install and try #3 at home (no firewall), to see if I'm using the proxy
class wrong in #4.
> If you know in advance which entries you want to read, then you just
> iterate until you have read all of them.
I do know which entries, but I can't get a successful openStream.
> Note that this will (internally)
> download /all/ of the data from the Web up to (and a bit past) the end of the
> last entry you are interested in. Obviously you need to ensure that the URL
> object isn't downloading the whole file to a cache first!
Yeah that's what I want to avoid. I'm hoping that by invoking the
getNextEntry() method of the ZipInputStream class as necessary it will
"rapidly" skip through the unneeded entries while reading directly from
the webserver.
> I don't know of one myself[*]. All in all, not obviously feasible unless
> you /really/ need this functionality.
Thanks for the links, comments, and considerations. This not a
showstopper. Just wanting to simplify the workflow since the archive
and the rest of it's contents are not needed. I'm hoping to at least
get it working so I can try it out. Even if I do get it working, it
might be a dog anyway and not worth doing from that standpoint. There
are also use cases where the archive is needed multiple times, so the
download first workflow will still be available.
Chris Uppal - 09 Apr 2006 08:32 GMT
[me:]
> > To do the first, you would need to wrap a ZipInputStream around in
> > InputStream which is reading the contents of the file. You can
> > probably (I haven't tried this) get a suitable InputStream from an URL
> > object (do URL objects support FTP ?).
>
> Isn't this what I tried in #3 and #4 in my original post?
Yes, I think it is. I missed that, sorry.
> Sounds like
> you are suggesting that this should work and perhaps I do need to
> install and try #3 at home (no firewall), to see if I'm using the proxy
> class wrong in #4.
I think that logically it should work, but logic is not always a reliable guide
;-) I haven't tried it myself at all.
Good luck !
-- chris