net.lingala.zip4j.model.Zip64EndCentralDirRecord.setNoOfThisDisk()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(160)

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

Zip64EndCentralDirRecord.setNoOfThisDisk介绍

暂无

代码示例

代码示例来源:origin: com.github.axet/zip4j

private void updateSplitZip64EndCentralDirRec(ZipModel zipModel, ArrayList fileSizeList) throws ZipException {
  if (zipModel == null) {
    throw new ZipException("zip model is null, cannot update split Zip64 end of central directory record");
  }
  
  if (zipModel.getZip64EndCentralDirRecord() == null) {
    return;
  }
  
  zipModel.getZip64EndCentralDirRecord().setNoOfThisDisk(0);
  zipModel.getZip64EndCentralDirRecord().setNoOfThisDiskStartOfCentralDir(0);
  zipModel.getZip64EndCentralDirRecord().setTotNoOfEntriesInCentralDirOnThisDisk(
      zipModel.getEndCentralDirRecord().getTotNoOfEntriesInCentralDir());
  
  long offsetStartCenDirWRTStartDiskNo = 0;
  
  for (int i = 0; i < fileSizeList.size(); i++) {
    offsetStartCenDirWRTStartDiskNo += ((Long)fileSizeList.get(i)).longValue();
  }
  
  zipModel.getZip64EndCentralDirRecord().setOffsetStartCenDirWRTStartDiskNo(
      ((Zip64EndCentralDirRecord)zipModel.getZip64EndCentralDirRecord()).getOffsetStartCenDirWRTStartDiskNo() + 
      offsetStartCenDirWRTStartDiskNo);
}

代码示例来源:origin: net.lingala.zip4j/zip4j

private void updateSplitZip64EndCentralDirRec(ZipModel zipModel, ArrayList fileSizeList) throws ZipException {
  if (zipModel == null) {
    throw new ZipException("zip model is null, cannot update split Zip64 end of central directory record");
  }
  
  if (zipModel.getZip64EndCentralDirRecord() == null) {
    return;
  }
  
  zipModel.getZip64EndCentralDirRecord().setNoOfThisDisk(0);
  zipModel.getZip64EndCentralDirRecord().setNoOfThisDiskStartOfCentralDir(0);
  zipModel.getZip64EndCentralDirRecord().setTotNoOfEntriesInCentralDirOnThisDisk(
      zipModel.getEndCentralDirRecord().getTotNoOfEntriesInCentralDir());
  
  long offsetStartCenDirWRTStartDiskNo = 0;
  
  for (int i = 0; i < fileSizeList.size(); i++) {
    offsetStartCenDirWRTStartDiskNo += ((Long)fileSizeList.get(i)).longValue();
  }
  
  zipModel.getZip64EndCentralDirRecord().setOffsetStartCenDirWRTStartDiskNo(
      ((Zip64EndCentralDirRecord)zipModel.getZip64EndCentralDirRecord()).getOffsetStartCenDirWRTStartDiskNo() + 
      offsetStartCenDirWRTStartDiskNo);
}

代码示例来源:origin: net.lingala.zip4j/zip4j

zip64EndCentralDirRecord.setNoOfThisDisk(Raw.readIntLittleEndian(intBuff, 0));

代码示例来源:origin: com.github.axet/zip4j

zip64EndCentralDirRecord.setNoOfThisDisk(Raw.readIntLittleEndian(intBuff, 0));

相关文章