|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--netcharts.server.util.JarUtils
Utilities for reading/writing/updating jars. Very raw. Much left to be done.
| Constructor Summary | |
JarUtils()
|
|
| Method Summary | |
static java.util.jar.JarOutputStream |
addFileToJar(java.lang.String jarName,
java.lang.String fileName,
byte[] fileContents)
Addes a file to a jar when supplied with the file name (jar entry name) and the file's contents. |
static java.util.jar.JarOutputStream |
addFileToJar(java.lang.String jarName,
java.lang.String fileName,
byte[] fileContents,
java.util.jar.JarOutputStream jar,
boolean closeJar)
Adds a file to a jar when supplied with the file name (jar entry name) and the file's contents; returns the unclosed JarOutputStream if requested |
static java.util.jar.JarOutputStream |
addFileToJar(java.lang.String jarName,
java.lang.String fileNameInJar,
java.lang.String filePath,
java.util.jar.JarOutputStream jar,
boolean closeJar)
Adds the named file to the jar. |
static void |
closeJar(java.util.jar.JarOutputStream jar)
Closes a JarOutputStream returned by one of the other methods |
static java.util.jar.JarOutputStream |
copyJarExceptFile(java.lang.String fromJarFileName,
java.lang.String toJarFileName,
java.lang.String exceptFileName,
boolean closeJar)
Creates a new jar with identical contents of the old jar except the named file is not copied |
static java.lang.String |
extractFileFromJar(java.lang.String entryName,
java.lang.String jarName)
Extracts the given file from the jar and returns the file contents as a String |
static void |
extractFileFromJar(java.lang.String entryName,
java.lang.String jarName,
java.lang.String destFileName)
Extracts a file from a jar and writes the file to the given destination filename |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JarUtils()
| Method Detail |
public static java.util.jar.JarOutputStream copyJarExceptFile(java.lang.String fromJarFileName,
java.lang.String toJarFileName,
java.lang.String exceptFileName,
boolean closeJar)
throws java.io.IOException
java.io.IOException -
public static void extractFileFromJar(java.lang.String entryName,
java.lang.String jarName,
java.lang.String destFileName)
throws java.io.IOException
entryName - jarName - destFileName - java.io.IOException -
public static java.lang.String extractFileFromJar(java.lang.String entryName,
java.lang.String jarName)
throws java.io.IOException
entryName - jarName - java.io.IOException -
public static java.util.jar.JarOutputStream addFileToJar(java.lang.String jarName,
java.lang.String fileName,
byte[] fileContents)
throws java.io.IOException
jarName - fileName - fileContents - java.io.IOException -
public static java.util.jar.JarOutputStream addFileToJar(java.lang.String jarName,
java.lang.String fileName,
byte[] fileContents,
java.util.jar.JarOutputStream jar,
boolean closeJar)
throws java.io.IOException
jarName - fileName - fileContents - jar - closeJar - java.io.IOException -
public static java.util.jar.JarOutputStream addFileToJar(java.lang.String jarName,
java.lang.String fileNameInJar,
java.lang.String filePath,
java.util.jar.JarOutputStream jar,
boolean closeJar)
throws java.io.IOException
jarName - the jar to add tofileNameInJar - file name to add to the jar; any path component will be reflected within the jarfilePath - fully-qualified name fo the file to readjar - optional open JarOutputStream; if null a new one will be createdcloseJar - whether the JarOutputStream should be closed after the file is addedjava.io.IOException -
public static void closeJar(java.util.jar.JarOutputStream jar)
throws java.io.IOException
jar - java.io.IOException -
|
NetCharts Server | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2007 |
Last Modified: Jun 14, 2007 |