Examples of exportZip()


Examples of com.googlecode.lucene.gae.tool.IndexTool.exportZip()

      resp.setContentType("application/zip");

      ServletOutputStream out = resp.getOutputStream();

      try {
        tool.exportZip(out);
      } finally {
        out.close();
      }

    }
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

   private Bundle installBundle(BundleContext context, Archive<?> archive) throws BundleException
   {
      // Export the bundle bytes
      ZipExporter exporter = archive.as(ZipExporter.class);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      exporter.exportZip(baos);

      InputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
      return context.installBundle(archive.getName(), inputStream);
   }
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

            Thread.currentThread().setContextClassLoader(JavaArchive.class.getClassLoader());
            Archive<?> archive = (Archive<?>)apMethod.invoke(null, requestedCommand.getArguments()[0]);

            ZipExporter ze = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ze.exportZip(baos);
            testRunner.commandResult(requestedCommand.getId(), baos.toByteArray());
         }
         catch (Exception e)
         {
            throw new RuntimeException(e);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

         {
            Thread.currentThread().setContextClassLoader(JavaArchiveImpl.class.getClassLoader());
            Archive<?> archive = (Archive<?>)apMethod.invoke(null, requestedCommand.getArguments()[0]);
            ZipExporter ze = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ze.exportZip(baos);
            testRunner.commandResult(requestedCommand.getId(), baos.toByteArray());
         }
         catch (RuntimeException rte)
         {
            throw rte;
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

      // [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
      {
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

      {
         // Read the archive in the context of the arquillian-osgi-bundle
         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         ZipExporter exporter = archive.as(ZipExporter.class);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         exporter.exportZip(baos);

         inputStream = new ByteArrayInputStream(baos.toByteArray());
      }
      finally
      {
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

   public byte[] getTestArchive(String name)
   {
      JavaArchive archive = delegate.getTestArchive(name);
      ZipExporter exporter = archive.as(ZipExporter.class);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      exporter.exportZip(baos);
      return baos.toByteArray();
   }
}
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

   private Bundle installBundle(BundleContext context, Archive<?> archive) throws BundleException
   {
      // Export the bundle bytes
      ZipExporter exporter = archive.as(ZipExporter.class);
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      exporter.exportZip(baos);

      InputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
      return context.installBundle(archive.getName(), inputStream);
   }
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

      {
         // Read the archive in the context of the arquillian-osgi-bundle
         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
         ZipExporter exporter = archive.as(ZipExporter.class);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         exporter.exportZip(baos);

         inputStream = new ByteArrayInputStream(baos.toByteArray());
      }
      finally
      {
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportZip()

      try
      {
         // Export the bundle bytes
         ZipExporter exporter = archive.as(ZipExporter.class);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         exporter.exportZip(baos);
        
         ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
        
         BundleContext sysContext = framework.getBundleContext();
         Bundle bundle = sysContext.installBundle(archive.getName(), inputStream);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.