gpt4 book ai didi

org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 05:46:40 31 4
gpt4 key购买 nike

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

ZipExporter.exportZip介绍

暂无

代码示例

代码示例来源:origin: org.jboss.osgi/jboss-osgi-spi

public static InputStream toInputStream(Archive<?> archive) throws IOException
{
 ZipExporter exporter = archive.as(ZipExporter.class);
 return exporter.exportZip();
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-jbossas-remote-51

public void handle(HttpExchange exchange) throws IOException
 {
   InputStream zip = archive.as(ZipExporter.class).exportZip();
   ByteArrayOutputStream zipStream = new ByteArrayOutputStream();
   JBossASRemoteContainer.copy(zip, zipStream);
   zip.close();
   byte[] zipArray = zipStream.toByteArray();
   exchange.sendResponseHeaders(200, zipArray.length);
   OutputStream out = exchange.getResponseBody();
   out.write(zipArray);
   out.close();
 }
});

代码示例来源:origin: arquillian/arquillian_deprecated

private void validateBundleArchive(Archive<?> archive) throws Exception
  {
   String archiveName = archive.getName();
   int dotIndex = archiveName.lastIndexOf(".");
   if (dotIndex > 0)
     archiveName = archiveName.substring(0, dotIndex);
   
   // [TODO] Can this be done in memory?
   File target = File.createTempFile(archiveName + "-", ".jar");
   try
   {
     ZipExporter exporter = archive.as(ZipExporter.class);
     exporter.exportZip(target, true);
     VirtualFile virtualFile = AbstractVFS.getRoot(target.toURI().toURL());
     BundleInfo.createBundleInfo(virtualFile);
   }
   finally
   {
     target.delete();
   }
  }
}

代码示例来源:origin: org.jboss.arquillian.protocol/arquillian-protocol-jmx-osgi

private void validateBundleArchive(Archive<?> archive) throws Exception
  {
   String archiveName = archive.getName();
   int dotIndex = archiveName.lastIndexOf(".");
   if (dotIndex > 0)
     archiveName = archiveName.substring(0, dotIndex);
   
   // [TODO] Can this be done in memory?
   File target = File.createTempFile(archiveName + "-", ".jar");
   try
   {
     ZipExporter exporter = archive.as(ZipExporter.class);
     exporter.exportZip(target, true);
     VirtualFile virtualFile = AbstractVFS.getRoot(target.toURI().toURL());
     BundleInfo.createBundleInfo(virtualFile);
   }
   finally
   {
     target.delete();
   }
  }
}

代码示例来源:origin: org.jboss.embedded/jboss-embedded-core

archive.as(ZipExporter.class).exportZip(tmpFile, true);

代码示例来源:origin: org.jboss.osgi/jboss-osgi-spi

public static VirtualFile toVirtualFile(Archive<?> archive) throws IOException, MalformedURLException
{
 ZipExporter exporter = archive.as(ZipExporter.class);
 return AbstractVFS.toVirtualFile(archive.getName(), exporter.exportZip());
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-jsr88-remote-1.2

ProgressObject progress = deploymentManager.distribute(
   deploymentManager.getTargets(), moduleTypeMapper.getModuleType(archive),
   archive.as(ZipExporter.class).exportZip(), null);
progress.addProgressListener(new JSR88DeploymentListener(this, progress.getResultTargetModuleIDs(), CommandType.DISTRIBUTE));
waitForModuleToStart();

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