/**
* 无需解压直接读取Zip文件和文件内容
*
* @param file
* @throws Exception
*/
public static InputStream readZipFile(String file) throws Exception {
InputStream input = null;
ZipFile zf = new ZipFile(file);
InputStream in = new BufferedInputStream(new FileInputStream(file));
ZipInputStream zin = new ZipInputStream(in);
ZipEntry ze;
while ((ze = zin.getNextEntry()) != null) {
if (ze.isDirectory()) {
// Do nothing
} else {
if (ze.getName().equals("map.xml")) {
input = zf.getInputStream(ze);
}
}
}
zin.closeEntry();
return input;
}