Reading files from an embedded ZIP archive
Posted
by
aix
on Stack Overflow
See other posts from Stack Overflow
or by aix
Published on 2012-03-26T12:51:11Z
Indexed on
2012/04/02
11:28 UTC
Read the original article
Hit count: 263
I have a ZIP archive that's embedded inside a larger file. I know the archive's starting offset within the larger file and its length.
Are there any Java libraries that would enable me to directly read the files contained within the archive? I am thinking along the lines of ZipFile.getInputStream()
. Unfortunately, ZipFile
doesn't work for this use case since its constructors require a standalone ZIP file.
For performance reasons, I cannot copy the ZIP achive into a separate file before opening it.
edit: Just to be clear, I do have random access to the file.
© Stack Overflow or respective owner