|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gemini.blueprint.test.internal.util.jar.JarUtils
public abstract class JarUtils
Utility class for Jar files. As opposed to JarCreator
, this class is
stateless and contains only static methods (hence the abstract qualifier).
Constructor Summary | |
---|---|
JarUtils()
|
Method Summary | |
---|---|
static int |
createJar(Manifest manifest,
Map entries,
OutputStream outputStream)
Creates a jar based on the given entries and manifest. |
static String |
dumpJarContent(JarInputStream jis)
Dumps the entries of a jar and return them as a String. |
static String |
dumpJarContent(org.springframework.core.io.Resource resource)
Dump the entries of a jar and return them as a String. |
static Manifest |
getManifest(InputStream stream)
Read the manifest for a given stream. |
static Manifest |
getManifest(org.springframework.core.io.Resource resource)
Convenience method for reading a manifest from a given resource. |
static int |
writeToJar(org.springframework.core.io.Resource res,
String entryName,
JarOutputStream jarStream)
Writes a resource content to a jar. |
static int |
writeToJar(org.springframework.core.io.Resource res,
String entryName,
JarOutputStream jarStream,
int bufferSize)
Writes a resource content to a jar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarUtils()
Method Detail |
---|
public static String dumpJarContent(JarInputStream jis)
jis
-
Exception
public static String dumpJarContent(org.springframework.core.io.Resource resource)
resource
-
public static int writeToJar(org.springframework.core.io.Resource res, String entryName, JarOutputStream jarStream) throws IOException
res
- entryName
- jarStream
-
Exception
IOException
public static int writeToJar(org.springframework.core.io.Resource res, String entryName, JarOutputStream jarStream, int bufferSize) throws IOException
res
- entryName
- jarStream
- bufferSize
-
Exception
IOException
public static Manifest getManifest(InputStream stream)
stream
-
public static Manifest getManifest(org.springframework.core.io.Resource resource)
resource
-
public static int createJar(Manifest manifest, Map entries, OutputStream outputStream) throws IOException
manifest
- jar manifestentries
- map of resources keyed by the jar entry namedoutputStream
- output stream for writing the jar
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |