本文整理了Java中net.lingala.zip4j.model.Zip64EndCentralDirRecord
类的一些代码示例,展示了Zip64EndCentralDirRecord
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zip64EndCentralDirRecord
类的具体详情如下:
包路径:net.lingala.zip4j.model.Zip64EndCentralDirRecord
类名称:Zip64EndCentralDirRecord
暂无
代码示例来源:origin: net.lingala.zip4j/zip4j
Zip64EndCentralDirRecord zip64EndCentralDirRecord = new Zip64EndCentralDirRecord();
zip64EndCentralDirRecord.setSignature(signature);
zip64EndCentralDirRecord.setSizeOfZip64EndCentralDirRec(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setVersionMadeBy(Raw.readShortLittleEndian(shortBuff, 0));
zip64EndCentralDirRecord.setVersionNeededToExtract(Raw.readShortLittleEndian(shortBuff, 0));
zip64EndCentralDirRecord.setNoOfThisDisk(Raw.readIntLittleEndian(intBuff, 0));
zip64EndCentralDirRecord.setNoOfThisDiskStartOfCentralDir(
Raw.readIntLittleEndian(intBuff, 0));
zip64EndCentralDirRecord.setTotNoOfEntriesInCentralDirOnThisDisk(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setTotNoOfEntriesInCentralDir(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setSizeOfCentralDir(Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setOffsetStartCenDirWRTStartDiskNo(
Raw.readLongLittleEndian(longBuff, 0));
long extDataSecSize = zip64EndCentralDirRecord.getSizeOfZip64EndCentralDirRec() - 44;
if (extDataSecSize > 0) {
代码示例来源: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
offSetStartCentralDir = zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo();
centralDirEntryCount = (int)zipModel.getZip64EndCentralDirRecord().getTotNoOfEntriesInCentralDir();
代码示例来源:origin: com.github.axet/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
代码示例来源:origin: com.github.axet/zip4j
outputStream.seek(zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo());
} else {
outputStream.seek(zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir());
代码示例来源:origin: net.lingala.zip4j/zip4j
zipModel.setZip64EndCentralDirRecord(readZip64EndCentralDirRec());
if(zipModel.getZip64EndCentralDirRecord() != null &&
zipModel.getZip64EndCentralDirRecord().getNoOfThisDisk() > 0){
zipModel.setSplitArchive(true);
} else {
代码示例来源:origin: com.github.axet/zip4j
offSetStartCentralDir = zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo();
centralDirEntryCount = (int)zipModel.getZip64EndCentralDirRecord().getTotNoOfEntriesInCentralDir();
代码示例来源:origin: net.lingala.zip4j/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
代码示例来源:origin: net.lingala.zip4j/zip4j
outputStream.seek(zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo());
} else {
outputStream.seek(zipModel.getEndCentralDirRecord().getOffsetOfStartOfCentralDir());
代码示例来源:origin: com.github.axet/zip4j
zipModel.setZip64EndCentralDirRecord(readZip64EndCentralDirRec());
if(zipModel.getZip64EndCentralDirRecord() != null &&
zipModel.getZip64EndCentralDirRecord().getNoOfThisDisk() > 0){
zipModel.setSplitArchive(true);
} else {
代码示例来源:origin: com.github.axet/zip4j
Zip64EndCentralDirRecord zip64EndCentralDirRecord = new Zip64EndCentralDirRecord();
zip64EndCentralDirRecord.setSignature(signature);
zip64EndCentralDirRecord.setSizeOfZip64EndCentralDirRec(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setVersionMadeBy(Raw.readShortLittleEndian(shortBuff, 0));
zip64EndCentralDirRecord.setVersionNeededToExtract(Raw.readShortLittleEndian(shortBuff, 0));
zip64EndCentralDirRecord.setNoOfThisDisk(Raw.readIntLittleEndian(intBuff, 0));
zip64EndCentralDirRecord.setNoOfThisDiskStartOfCentralDir(
Raw.readIntLittleEndian(intBuff, 0));
zip64EndCentralDirRecord.setTotNoOfEntriesInCentralDirOnThisDisk(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setTotNoOfEntriesInCentralDir(
Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setSizeOfCentralDir(Raw.readLongLittleEndian(longBuff, 0));
zip64EndCentralDirRecord.setOffsetStartCenDirWRTStartDiskNo(
Raw.readLongLittleEndian(longBuff, 0));
long extDataSecSize = zip64EndCentralDirRecord.getSizeOfZip64EndCentralDirRec() - 44;
if (extDataSecSize > 0) {
代码示例来源: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: com.github.axet/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
代码示例来源:origin: net.lingala.zip4j/zip4j
if (zipModel.isZip64Format()) {
if (zipModel.getZip64EndCentralDirRecord() != null) {
offsetStartCentralDir = zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo();
代码示例来源:origin: net.lingala.zip4j/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
代码示例来源:origin: com.github.axet/zip4j
if (zipModel.isZip64Format()) {
if (zipModel.getZip64EndCentralDirRecord() != null) {
offsetStartCentralDir = zipModel.getZip64EndCentralDirRecord().getOffsetStartCenDirWRTStartDiskNo();
代码示例来源:origin: net.lingala.zip4j/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
代码示例来源:origin: com.github.axet/zip4j
zipModel.setZip64EndCentralDirRecord(new Zip64EndCentralDirRecord());
内容来源于网络,如有侵权,请联系作者删除!