com.github.junrar.Archive.isOldFormat()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(141)

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

Archive.isOldFormat介绍

暂无

代码示例

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

public void unpWrite(byte[] addr, int offset, int count) throws IOException {
  if (!testMode) {
    // DestFile->Write(Addr,Count);
    outputStream.write(addr, offset, count);
  }
  curUnpWrite += count;
  if (!skipUnpCRC) {
    if (archive.isOldFormat()) {
      unpFileCRC = RarCRC
          .checkOldCrc((short) unpFileCRC, addr, count);
    } else {
      unpFileCRC = RarCRC.checkCrc((int) unpFileCRC, addr, offset,
          count);
    }
  }
  // if (!skipArcCRC) {
  // archive.updateDataCRC(Addr, offset, ReadSize);
  // }
}

代码示例来源:origin: edmund-wagner/junrar

public void unpWrite(byte[] addr, int offset, int count) throws IOException {
  if (!testMode) {
    // DestFile->Write(Addr,Count);
    outputStream.write(addr, offset, count);
  }
  curUnpWrite += count;
  if (!skipUnpCRC) {
    if (archive.isOldFormat()) {
      unpFileCRC = RarCRC
          .checkOldCrc((short) unpFileCRC, addr, count);
    } else {
      unpFileCRC = RarCRC.checkCrc((int) unpFileCRC, addr, offset,
          count);
    }
  }
  // if (!skipArcCRC) {
  // archive.updateDataCRC(Addr, offset, ReadSize);
  // }
}

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

@Override
  public Volume nextArchive(final Archive archive, final Volume last) throws IOException {
    if (last == null) return new FileVolume(archive, this.firstVolume);

    final FileVolume lastFileVolume = (FileVolume) last;
    final boolean oldNumbering = !archive.getMainHeader().isNewNumbering()
        || archive.isOldFormat();
    final String nextName = VolumeHelper.nextVolumeName(lastFileVolume.getFile()
        .getAbsolutePath(), oldNumbering);
    final File nextVolume = new File(nextName);

    return new FileVolume(archive, nextVolume);
  }
}

代码示例来源:origin: edmund-wagner/junrar

@Override
  public Volume nextArchive(Archive archive, Volume last)
      throws IOException {
    if (last == null)
      return new FileVolume(archive, firstVolume);

    FileVolume lastFileVolume = (FileVolume) last;
    boolean oldNumbering = !archive.getMainHeader().isNewNumbering()
        || archive.isOldFormat();
    String nextName = VolumeHelper.nextVolumeName(lastFileVolume.getFile()
        .getAbsolutePath(), oldNumbering);
    File nextVolume = new File(nextName);

    return new FileVolume(archive, nextVolume);
  }
}

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

@Override
  public Volume nextArchive(final Archive archive, final Volume last) throws IOException {
    if (last == null) return new VFSVolume(archive, this.firstVolume);

    final VFSVolume vfsVolume = (VFSVolume) last;
    final boolean oldNumbering = !archive.getMainHeader().isNewNumbering()
        || archive.isOldFormat();
    final String nextName = VolumeHelper.nextVolumeName(vfsVolume.getFile()
        .getName().getBaseName(), oldNumbering);
    final FileObject nextVolumeFile = this.firstVolume.getParent().resolveFile(
        nextName);

    return new VFSVolume(archive, nextVolumeFile);
  }
}

代码示例来源:origin: edmund-wagner/junrar

@Override
  public Volume nextArchive(Archive archive, Volume last) throws IOException {
    if (last == null)
      return new VFSVolume(archive, firstVolume);

    VFSVolume vfsVolume = (VFSVolume) last;
    boolean oldNumbering = !archive.getMainHeader().isNewNumbering()
        || archive.isOldFormat();
    String nextName = VolumeHelper.nextVolumeName(vfsVolume.getFile()
        .getName().getBaseName(), oldNumbering);
    FileObject nextVolumeFile = firstVolume.getParent().resolveFile(
        nextName);

    return new VFSVolume(archive, nextVolumeFile);
  }
}

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

this.dataIO.init(os);
this.dataIO.init(hd);
this.dataIO.setUnpFileCRC(this.isOldFormat() ? 0 : 0xffFFffFF);
if (this.unpack == null) {
  this.unpack = new Unpack(this.dataIO);

代码示例来源:origin: edmund-wagner/junrar

dataIO.init(os);
dataIO.init(hd);
dataIO.setUnpFileCRC(this.isOldFormat() ? 0 : 0xffFFffFF);
if (unpack == null) {
  unpack = new Unpack(dataIO);

相关文章