gpt4 book ai didi

net.lingala.zip4j.model.Zip64ExtendedInfo类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:05:33 27 4
gpt4 key购买 nike

本文整理了Java中net.lingala.zip4j.model.Zip64ExtendedInfo类的一些代码示例,展示了Zip64ExtendedInfo类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zip64ExtendedInfo类的具体详情如下:
包路径:net.lingala.zip4j.model.Zip64ExtendedInfo
类名称: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();

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com