我有 byte[] zipFileAsByteArray
This zip file has rootDir --|
| --- Folder1 - first.txt
| --- Folder2 - second.txt
| --- PictureFolder - image.png
我需要的是获取两个 txt 文件并读取它们,而不在磁盘上保存任何文件。只是在记忆中做。
我试过这样的事情:
ByteArrayInputStream bis = new ByteArrayInputStream(processZip);
ZipInputStream zis = new ZipInputStream(bis);
另外我需要有单独的方法去获取图片。像这样的东西:
public byte[]image getImage(byte[] zipContent);
有人可以帮助我提出想法或好例子吗?