org.overlord.sramp.client.jar
Class JarToSrampArchive

java.lang.Object
  extended by org.overlord.sramp.client.jar.JarToSrampArchive

public class JarToSrampArchive
extends Object

Class that converts a JAR into an S-RAMP archive. This class performs the following tasks:

Author:
eric.wittmann@redhat.com

Constructor Summary
JarToSrampArchive(File jar)
          Constructor.
JarToSrampArchive(InputStream jarStream)
          Constructor from JAR input stream.
 
Method Summary
 void close()
          This object should be closed once we're done with it.
static void closeQuietly(JarToSrampArchive j2sramp)
           
 SrampArchive createSrampArchive()
          Creates an S-RAMP archive from this JAR.
 void setArtifactFilter(ArtifactFilter artifactFilter)
           
 void setMetaDataFactory(MetaDataFactory metaDataFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarToSrampArchive

public JarToSrampArchive(File jar)
                  throws JarToSrampArchiveException
Constructor.

Parameters:
jar -
Throws:
JarToSrampArchiveException

JarToSrampArchive

public JarToSrampArchive(InputStream jarStream)
                  throws JarToSrampArchiveException
Constructor from JAR input stream. Note, this will consume and close the given InputStream.

Parameters:
jarStream -
Throws:
JarToSrampArchiveException
Method Detail

createSrampArchive

public SrampArchive createSrampArchive()
                                throws JarToSrampArchiveException
Creates an S-RAMP archive from this JAR.

Returns:
an S-RAMP archive
Throws:
JarToSrampArchiveException

close

public void close()
           throws IOException
This object should be closed once we're done with it. This allows us to clean up some resources.

Throws:
IOException

setArtifactFilter

public void setArtifactFilter(ArtifactFilter artifactFilter)
Parameters:
artifactFilter - the artifactFilter to set

setMetaDataFactory

public void setMetaDataFactory(MetaDataFactory metaDataFactory)
Parameters:
metaDataFactory - the metaDataFactory to set

closeQuietly

public static void closeQuietly(JarToSrampArchive j2sramp)
Parameters:
j2sramp -


Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.