de.schlichtherle.truezip.zip.ZipEntry.<init>()方法的使用及代码示例

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

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

ZipEntry.<init>介绍

[英]Constructs a new ZIP entry with the given name.
[中]用给定的名称构造一个新的ZIP条目。

代码示例

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

@Override
  public ZipEntry newEntry(String name) {
    return new ZipEntry(name);
  }
}

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

@Override
public ZipEntry newEntry(String name) {
  return new ZipEntry(name);
}

代码示例来源:origin: digital-preservation/droid

@SuppressWarnings("unchecked")
@Override
protected void handleFile(final File file, final int depth, final Collection results)
  throws IOException {
  final String entryPath = getUnixStylePath(StringUtils.substringAfter(file.getAbsolutePath(), source.toAbsolutePath().toString() + File.separator));
  //ZipArchiveEntry entry = (ZipArchiveEntry) out.createArchiveEntry(file, entryPath);
  //out.putArchiveEntry(entry);
  final ZipEntry entry = new ZipEntry(entryPath);
  out.putNextEntry(entry);
  try (final InputStream in = new BufferedInputStream(Files.newInputStream(file.toPath()))) {
    bytesProcessed = writeFile(in, out, callback, bytesProcessed, bytesToProcess);
  } finally {
    //out.closeArchiveEntry();
    out.closeEntry();
  }
}

代码示例来源:origin: uk.gov.nationalarchives/droid-results

@SuppressWarnings("unchecked")
@Override
protected void handleFile(File file, int depth, Collection results)
  throws IOException {
  String entryPath = getUnixStylePath(StringUtils.substringAfter(file
      .getAbsolutePath(), sourcePath));
  //ZipArchiveEntry entry = (ZipArchiveEntry) out.createArchiveEntry(file, entryPath);
  //out.putArchiveEntry(entry);
  ZipEntry entry = new ZipEntry(entryPath);
  out.putNextEntry(entry);
  final BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
  try {
    bytesProcessed = writeFile(in, out, callback, bytesProcessed, bytesToProcess);
  } finally {
    //out.closeArchiveEntry();
    out.closeEntry();
    in.close();
  }
}

代码示例来源:origin: uk.gov.nationalarchives/droid-core-interfaces

ZipEntry entry = new ZipEntry(pathName);
String dirName = FilenameUtils.getName(pathName.substring(0, pathName.length() - 1));
longestParentId = submitDirectory(parentName, entry, dirName, longestParentId);

代码示例来源:origin: digital-preservation/droid

ZipEntry entry = new ZipEntry(pathName);
String dirName = FilenameUtils.getName(pathName.substring(0, pathName.length() - 1));
longestParentId = submitDirectory(parentName, entry, dirName, longestParentId);

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

private void setMethod0(final int method) {
  final ZipEntry test = new ZipEntry("");
  test.setMethod(method);
  this.method = test.getMethod();
}

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

@Override
  public ZipEntry newEntry(String name) {
    ZipEntry entry = new ZipEntry(name);
    entry.setMethod(DEFLATED);
    return entry;
  }
}

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

@Override
public ZipEntry newEntry(String name) {
  ZipEntry entry = new ZipEntry(name);
  entry.setEncrypted(true);
  return entry;
}

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

@Override
  public ZipEntry newEntry(String name) {
    ZipEntry entry = new ZipEntry(name);
    entry.setMethod(BZIP2);
    return entry;
  }
}

代码示例来源:origin: pl.edu.icm.cocos/cocos-services

ZipEntry newEntry = new ZipEntry(fileName);
zipOutputStream.putNextEntry(newEntry);
final InputStream is = fileResource.getInputStream();

代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip

for (int i = FIRST_ENTRY; i <= LAST_ENTRY; i++) {
  final String name = Integer.toString(i);
  final ZipEntry entry = new ZipEntry(name);

相关文章