public static void forEach(final ZipInputStream zipInputStream, final String prefix, final ResourceHandler handler) {
final int pos = prefix.length();
ZipEntry entry = null;
while ((entry = LdiZipInputStreamUtil.getNextEntry(zipInputStream)) != null) {
if (!entry.isDirectory()) {
final String entryName = entry.getName().replace('\\', '/');
if (!entryName.startsWith(prefix)) {
continue;
}
handler.processResource(entryName.substring(pos), new FilterInputStream(zipInputStream) {
public void close() throws IOException {
LdiZipInputStreamUtil.closeEntry(zipInputStream);
}
});
}
}
}
ResourceTraversal.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:lasta-di
作者:
评论列表
文章目录