zipinputstream

ZipInputStream(InputStream, Charset) decodes ZipEntry file name falsely

穿精又带淫゛_ 提交于 2019-12-01 05:48:22
Java 7 is supposed to fix an old problem with unpacking zip archives with character sets other than UTF-8. This can be achieved by constructor ZipInputStream(InputStream, Charset) . So far, so good. I can unpack a zip archive containing file names with umlauts in them when explicitly setting an ISO-8859-1 character set. But here is the problem: When iterating over the stream using ZipInputStream.getNextEntry() , the entries have wrong special characters in their names. In my case the umlaut "ü" is replaced by a "?" character, which is obviously wrong. Does anybody know how to fix this?

How to speed up unzipping time in Java / Android?

此生再无相见时 提交于 2019-11-27 10:48:25
Unzipping files on android seems to be dreadfully slow. At first I thought this was just the emulator but it appears to be the same on the phone. I've tried different compression levels, and eventually dropped down to storage mode but it still takes ages. Anyway, there must be a reason! Does anyone else have this problem? My unzip method looks like this: public void unzip() { try{ FileInputStream fin = new FileInputStream(zipFile); ZipInputStream zin = new ZipInputStream(fin); File rootfolder = new File(directory); rootfolder.mkdirs(); ZipEntry ze = null; while ((ze = zin.getNextEntry())!=null

How to speed up unzipping time in Java / Android?

北慕城南 提交于 2019-11-26 17:58:13
问题 Unzipping files on android seems to be dreadfully slow. At first I thought this was just the emulator but it appears to be the same on the phone. I've tried different compression levels, and eventually dropped down to storage mode but it still takes ages. Anyway, there must be a reason! Does anyone else have this problem? My unzip method looks like this: public void unzip() { try{ FileInputStream fin = new FileInputStream(zipFile); ZipInputStream zin = new ZipInputStream(fin); File rootfolder