gpt4 book ai didi

pl.edu.icm.yadda.export.output.ZipOutput类的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 10:01:31 25 4
gpt4 key购买 nike

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

ZipOutput介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.yadda/yadda-user

/** Exports user catalog to a new file in zip file format. This is
 * convenience shortcut for @see exportUserCatalog(DumpOutput output, int chunkSize)
 * method. Newly created archive contains a number of XML files in directory
 * aal representing users, groups and roles from archive.
 * @param zipFileName output file name
 * @throws IOException
 * @throws ServiceException
 */
public void exportUserCatalogToZip(String zipFileName)
    throws IOException, ServiceException {
  ZipOutput output = new ZipOutput(zipFileName);
  exportUserCatalog(output, DEFAULT_CHUNK_SIZE);
  output.close();
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-common

public void storeRecord(String path, InputStream data, long size)
    throws IOException {        
  path = path.replaceAll("/+", "/").replace("\\", "/");
  if(exportedFiles.contains(path)) {
    log.debug(String.format("Skipping already stored entry '%s'", path));
    return;
  }
  ZipEntry ze = new ZipEntry(path);
  zipOutput.putNextEntry(ze);
  copyStream(data, zipOutput, true, false);
  zipOutput.closeEntry();
  exportedFiles.add(path);
}

代码示例来源:origin: pl.edu.icm.yadda.repowebeditor/repository-web-editor-core

private void sendUpdateReport(SaveOperation operation, Ancestors ancestors, WebUserDetails userDetails, String title) throws IOException, RepositoryException {
  ZipOutput zipOutput = new ZipOutput(os);
  for (String partType:operation.getObject().getPartTypes()) {
    if ("BWMETA1".equals(partType)) {
      zipOutput.storeRecord("imports_new/" + operation.getObject().getId().getId() + ".xml", operation.getObject().getPart(partType).getData().toString());
          journal = element.getOneName().getText();
        zipOutput.storeRecord("imports_new/" + id + ".xml", YaddaTransformers.BTF.getWriter(Y, BWMETA_1_0).write(element));
  zipOutput.close();

代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import

protected DumpOutput resolveOutput(String format, OutputStream os)
    throws IOException {
  DumpOutput output;
  if (BasicPackConstants.FORMAT_ZIP.equals(format)) {
    output = new ZipOutput(os);
  } else if (BasicPackConstants.FORMAT_TGZ.equals(format)) {
    output = new TgzOutput(os);
  } else if (BasicPackConstants.FORMAT_TAR.equals(format)) {
    output = new TarOutput(os);
  } else {
    throw new IllegalStateException("Unknown format expected " + format);
  }
  return output;
}

代码示例来源:origin: pl.edu.icm.yadda/bwmeta-import

protected DumpOutput resolveOutput(String format, String outputFile)
    throws IOException {
  DumpOutput output;
  if (BasicPackConstants.FORMAT_ZIP.equals(format)) {
    output = new ZipOutput(outputFile);
  } else if (BasicPackConstants.FORMAT_TGZ.equals(format)) {
    output = new TgzOutput(outputFile);
  } else if (BasicPackConstants.FORMAT_TAR.equals(format)) {
    output = new TarOutput(outputFile);
  } else {
    throw new IllegalStateException("Unknown format expected " + format);
  }
  return output;
}

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