org.ops4j.pax.drone.spi.util
Class DroneUtils

java.lang.Object
  extended by org.ops4j.pax.drone.spi.util.DroneUtils

public class DroneUtils
extends java.lang.Object

User: Toni Menzel (tonit) Date: May 29, 2008

Derived from pax url bnd. TODO fix building paxdrone contents in final drone (don't include)


Method Summary
static void copy(java.io.InputStream in, java.io.OutputStream out)
           
static java.io.InputStream createBundle(java.io.InputStream jarInputStream, java.util.Properties instructions, java.lang.String jarInfo)
          Precesses the input jar and generates the necessary OSGi headers using specified instructions.
static java.util.Properties parseInstructions(java.lang.String query)
          Parses bnd instructions out of an url query string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createBundle

public static java.io.InputStream createBundle(java.io.InputStream jarInputStream,
                                               java.util.Properties instructions,
                                               java.lang.String jarInfo)
                                        throws java.io.IOException
Precesses the input jar and generates the necessary OSGi headers using specified instructions.

Parameters:
jarInputStream - input stream for the jar to be processed. Cannot be null.
instructions - bnd specific processing instructions. Cannot be null.
jarInfo - information about the jar to be processed. Usually the jar url. Cannot be null or empty.
Returns:
an input strim for the generated bundle
Throws:
org.ops4j.lang.NullArgumentException - if any of the paramters is null
java.io.IOException - re-thron during jar processing

parseInstructions

public static java.util.Properties parseInstructions(java.lang.String query)
                                              throws java.net.MalformedURLException
Parses bnd instructions out of an url query string.

Parameters:
query - query part of an url.
Returns:
parsed instructions as properties
Throws:
java.net.MalformedURLException - if provided path does not comply to syntax.

copy

public static void copy(java.io.InputStream in,
                        java.io.OutputStream out)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2008. All Rights Reserved.