I have a zip file structure.
MyZip.zip
folder_1
folder_1_1
file_1_1_1
file_1_1_2
folder_1_2
file_1_2_1
file_1_2_2
folder_2
folder_2_1
folder_2_1_1
needed_file //This is the file I need to read.
So, I need to read file - needed_file
from folder_2_1_1
folder, which is inside of folder_2_1
, and so on.
This is how to unzip all data from a zip file. I do not need to unzip the archive. My question, is it possible to retrieve the file I need without unzipping the whole archive.
I tried
ZipFile zipFile = new ZipFile(file);
ZipEntry entry = zipFile.getEntry("folder_2");
But I did not find a way how to manipulate zipEntry
as a directory.