public interface ZipResource extends Closeable
Modifier and Type | Method and Description |
---|---|
InputStream |
get(String path)
获取指定路径的文件流
如果是文件模式,则直接获取Entry对应的流,如果是流模式,则遍历entry后,找到对应流返回 |
InputStream |
get(ZipEntry entry)
获取指定
ZipEntry 对应的文件流 |
void |
read(Consumer<ZipEntry> consumer,
int maxSizeDiff)
读取并处理Zip文件中的每一个
ZipEntry |
void read(Consumer<ZipEntry> consumer, int maxSizeDiff)
ZipEntry
consumer
- ZipEntry
处理器maxSizeDiff
- 检查ZipBomb文件差异倍数,-1表示不检查ZipBombInputStream get(String path)
path
- 路径InputStream get(ZipEntry entry)
ZipEntry
对应的文件流entry
- ZipEntry
Copyright © 2025. All rights reserved.