Rewinding ZipInputStream - Android -


i trying read zip archive zipinputstream. cycle through entries without problem so:

  try {                 while((ze = zis.getnextentry()) != null) {                     log.v(this.tostring(), "name = " + name);                  }         } catch (ioexception e) {             // todo auto-generated catch block             //e.printstacktrace();             log.e(this.tostring(), "ioexception in creating zipentry.");         }    

when try use zis variable read same zip file in function, in same manner described above, line ze = zis.getnextentry() returns null. understandable because end of stream has been reached.

my question(s):
1. how "rewind" stream?
2. there alternate creating temporary zipinputstream , using in next function required read zip file again?

there no way rewind zipinputstream in java.

the alternative restructure code have read stream once. advantageous (depending on context of situation), not require unzipping data more once.

maybe unzip data temporary cache directory instead.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -