本文整理了Java中org.apache.commons.compress.archivers.zip.ZipFile.resolveLocalFileHeaderData()
方法的一些代码示例,展示了ZipFile.resolveLocalFileHeaderData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFile.resolveLocalFileHeaderData()
方法的具体详情如下:
包路径:org.apache.commons.compress.archivers.zip.ZipFile
类名称:ZipFile
方法名:resolveLocalFileHeaderData
[英]Walks through all recorded entries and adds the data available from the local file header.
Also records the offsets for the data to read from the entries.
[中]浏览所有记录的条目,并添加本地文件头中可用的数据。
还记录要从条目中读取的数据的偏移量。
代码示例来源:origin: org.apache.commons/commons-compress
private ZipFile(final SeekableByteChannel channel, final String archiveName,
final String encoding, final boolean useUnicodeExtraFields,
final boolean closeOnError)
throws IOException {
this.archiveName = archiveName;
this.encoding = encoding;
this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
this.useUnicodeExtraFields = useUnicodeExtraFields;
archive = channel;
boolean success = false;
try {
final Map<ZipArchiveEntry, NameAndComment> entriesWithoutUTF8Flag =
populateFromCentralDirectory();
resolveLocalFileHeaderData(entriesWithoutUTF8Flag);
success = true;
} finally {
closed = !success;
if (!success && closeOnError) {
IOUtils.closeQuietly(archive);
}
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
private ZipFile(final SeekableByteChannel channel, final String archiveName,
final String encoding, final boolean useUnicodeExtraFields,
final boolean closeOnError)
throws IOException {
this.archiveName = archiveName;
this.encoding = encoding;
this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
this.useUnicodeExtraFields = useUnicodeExtraFields;
archive = channel;
boolean success = false;
try {
final Map<ZipArchiveEntry, NameAndComment> entriesWithoutUTF8Flag =
populateFromCentralDirectory();
resolveLocalFileHeaderData(entriesWithoutUTF8Flag);
success = true;
} finally {
closed = !success;
if (!success && closeOnError) {
IOUtils.closeQuietly(archive);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!