is it possible to get a zipentry's inputstream from a zipinputstream?

前端 未结 3 808
孤城傲影
孤城傲影 2020-12-10 23:39

I\'m receiving a ZipInputStream from another source, and I need to provide the first entry\'s InputStream to another source.

I was hoping to be able to do this witho

3条回答
  •  情歌与酒
    2020-12-11 00:42

    figured:

    it's entirely possible, the call to ZipInputStream.getNextEntry() positions the InputStream at the start of the entry and therefore supplying the ZipInputStream is the equivalent of supplying a ZipEntry's InputStream.

    the ZipInputStream is smart enough to handle the entry's EOF downstream, or so it seems.

    p.

提交回复
热议问题