本文整理了Java中net.lingala.zip4j.model.Zip64ExtendedInfo
类的一些代码示例,展示了Zip64ExtendedInfo
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zip64ExtendedInfo
类的具体详情如下:
包路径:net.lingala.zip4j.model.Zip64ExtendedInfo
类名称:Zip64ExtendedInfo
暂无
代码示例来源:origin: com.github.axet/zip4j
Zip64ExtendedInfo zip64ExtendedInfo = new Zip64ExtendedInfo();
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setUnCompressedSize(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setCompressedSize(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setOffsetLocalHeader(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, intByteBuff, 0, 4);
int val = Raw.readIntLittleEndian(intByteBuff, 0);
zip64ExtendedInfo.setDiskNumberStart(val);
counter += 8;
valueAdded = true;
代码示例来源:origin: net.lingala.zip4j/zip4j
if (zip64ExtendedInfo.getUnCompressedSize() != -1)
fileHeader.setUncompressedSize(zip64ExtendedInfo.getUnCompressedSize());
if (zip64ExtendedInfo.getCompressedSize() != -1)
fileHeader.setCompressedSize(zip64ExtendedInfo.getCompressedSize());
if (zip64ExtendedInfo.getOffsetLocalHeader() != -1)
fileHeader.setOffsetLocalHeader(zip64ExtendedInfo.getOffsetLocalHeader());
if (zip64ExtendedInfo.getDiskNumberStart() != -1)
fileHeader.setDiskNumberStart(zip64ExtendedInfo.getDiskNumberStart());
代码示例来源:origin: net.lingala.zip4j/zip4j
private long calculateTotalWork(ArrayList fileHeaders) throws ZipException {
if (fileHeaders == null) {
throw new ZipException("fileHeaders is null, cannot calculate total work");
}
long totalWork = 0;
for (int i = 0; i < fileHeaders.size(); i++) {
FileHeader fileHeader = (FileHeader)fileHeaders.get(i);
if (fileHeader.getZip64ExtendedInfo() != null &&
fileHeader.getZip64ExtendedInfo().getUnCompressedSize() > 0) {
totalWork += fileHeader.getZip64ExtendedInfo().getCompressedSize();
} else {
totalWork += fileHeader.getCompressedSize();
}
}
return totalWork;
}
代码示例来源:origin: net.lingala.zip4j/zip4j
fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetLocalFileHeader = fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader();
offsetEndOfCompressedFile = nextFileHeader.getOffsetLocalHeader() - 1;
if (nextFileHeader.getZip64ExtendedInfo() != null &&
nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetEndOfCompressedFile = nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() - 1;
long offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getOffsetLocalHeader();
if (((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo() != null &&
((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader();
代码示例来源:origin: com.github.axet/zip4j
private long calculateTotalWork(ArrayList fileHeaders) throws ZipException {
if (fileHeaders == null) {
throw new ZipException("fileHeaders is null, cannot calculate total work");
}
long totalWork = 0;
for (int i = 0; i < fileHeaders.size(); i++) {
FileHeader fileHeader = (FileHeader)fileHeaders.get(i);
if (fileHeader.getZip64ExtendedInfo() != null &&
fileHeader.getZip64ExtendedInfo().getUnCompressedSize() > 0) {
totalWork += fileHeader.getZip64ExtendedInfo().getCompressedSize();
} else {
totalWork += fileHeader.getCompressedSize();
}
}
return totalWork;
}
代码示例来源:origin: com.github.axet/zip4j
fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetLocalFileHeader = fileHeader.getZip64ExtendedInfo().getOffsetLocalHeader();
offsetEndOfCompressedFile = nextFileHeader.getOffsetLocalHeader() - 1;
if (nextFileHeader.getZip64ExtendedInfo() != null &&
nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetEndOfCompressedFile = nextFileHeader.getZip64ExtendedInfo().getOffsetLocalHeader() - 1;
long offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getOffsetLocalHeader();
if (((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo() != null &&
((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader() != -1) {
offsetLocalHdr = ((FileHeader)zipModel.getCentralDirectory().getFileHeaders().get(i)).getZip64ExtendedInfo().getOffsetLocalHeader();
代码示例来源:origin: net.lingala.zip4j/zip4j
Zip64ExtendedInfo zip64ExtendedInfo = new Zip64ExtendedInfo();
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setUnCompressedSize(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setCompressedSize(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, longByteBuff, 0, 8);
long val = Raw.readLongLittleEndian(longByteBuff, 0);
zip64ExtendedInfo.setOffsetLocalHeader(val);
counter += 8;
valueAdded = true;
System.arraycopy(byteBuff, counter, intByteBuff, 0, 4);
int val = Raw.readIntLittleEndian(intByteBuff, 0);
zip64ExtendedInfo.setDiskNumberStart(val);
counter += 8;
valueAdded = true;
代码示例来源:origin: com.github.axet/zip4j
if (zip64ExtendedInfo.getUnCompressedSize() != -1)
fileHeader.setUncompressedSize(zip64ExtendedInfo.getUnCompressedSize());
if (zip64ExtendedInfo.getCompressedSize() != -1)
fileHeader.setCompressedSize(zip64ExtendedInfo.getCompressedSize());
if (zip64ExtendedInfo.getOffsetLocalHeader() != -1)
fileHeader.setOffsetLocalHeader(zip64ExtendedInfo.getOffsetLocalHeader());
if (zip64ExtendedInfo.getDiskNumberStart() != -1)
fileHeader.setDiskNumberStart(zip64ExtendedInfo.getDiskNumberStart());
代码示例来源:origin: net.lingala.zip4j/zip4j
localFileHeader.setZip64ExtendedInfo(zip64ExtendedInfo);
if (zip64ExtendedInfo.getUnCompressedSize() != -1)
localFileHeader.setUncompressedSize(zip64ExtendedInfo.getUnCompressedSize());
if (zip64ExtendedInfo.getCompressedSize() != -1)
localFileHeader.setCompressedSize(zip64ExtendedInfo.getCompressedSize());
代码示例来源:origin: net.lingala.zip4j/zip4j
if (zip64ExtendedInfo.getOffsetLocalHeader() > 0) {
locHdrOffset = fileHeader.getOffsetLocalHeader();
代码示例来源:origin: com.github.axet/zip4j
localFileHeader.setZip64ExtendedInfo(zip64ExtendedInfo);
if (zip64ExtendedInfo.getUnCompressedSize() != -1)
localFileHeader.setUncompressedSize(zip64ExtendedInfo.getUnCompressedSize());
if (zip64ExtendedInfo.getCompressedSize() != -1)
localFileHeader.setCompressedSize(zip64ExtendedInfo.getCompressedSize());
代码示例来源:origin: com.github.axet/zip4j
if (zip64ExtendedInfo.getOffsetLocalHeader() > 0) {
locHdrOffset = fileHeader.getOffsetLocalHeader();
内容来源于网络,如有侵权,请联系作者删除!