本文整理了Java中pl.edu.icm.yadda.export.output.ZipOutput
类的一些代码示例,展示了ZipOutput
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipOutput
类的具体详情如下:
包路径:pl.edu.icm.yadda.export.output.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;
}
内容来源于网络,如有侵权,请联系作者删除!