|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.tools.minijar.MiniJar
public class MiniJar
Constructor Summary | |
---|---|
MiniJar()
Empty constructor. |
|
MiniJar(java.lang.String[] args)
Constructor which processes a list of commands. |
Method Summary | |
---|---|
void |
addClasspath(java.lang.String path)
Adds a directory or compressed file for searching additional references made in the selected Java classes. |
void |
addDesired(java.lang.String pattern)
Add files matching the pattern to the output. |
void |
addDesiredFrom(java.lang.String pattern,
java.lang.String path)
Add files matching the pattern to the output but only from the given source |
void |
addExclude(java.io.File compressedFile)
Excludes from the output all files in a given ZIP or JAR file. |
void |
addExclude(java.lang.String pattern)
Excludes from the output all files which match the pattern in any of the search (either -s or -c) directories. |
void |
addForced(java.lang.String pattern)
Forces the output to include files that match the given pattern, even if a exclude pattern suggests to exclude them. |
void |
addSourcePath(java.lang.String path)
Adds a source path, i.e. |
java.util.Set<java.lang.String> |
compress()
Starts the process and creates the output file. |
java.util.Set<java.lang.String> |
compress(java.util.Set<PathAndFile> matches)
Compresses a given list of matches. |
static boolean |
compress(java.util.Set<PathAndFile> list,
java.io.File target,
java.util.jar.Manifest manifest)
Compresses the list of files into a JAR or ZIP file. |
static java.util.jar.Manifest |
createManifest(java.lang.String classpath,
java.lang.String mainclass)
Creates a Manifest for a JAR file with the given parameters |
static java.util.jar.Manifest |
createManifest(java.lang.String classpath,
java.lang.String mainclass,
java.util.Set<java.lang.String> extraInfo)
Creates a Manifest for a JAR file with the given parameters |
static void |
freeMemory()
Frees memory used to store the contents of directories and compressed files. |
java.util.Set<PathAndFile> |
getMatches()
Creates the list of files that match the instruction set. |
java.util.Set<java.lang.String> |
getMissingFilesList()
Returns the list of missing files after a match search. |
static void |
main(java.lang.String[] args)
Standard main program. |
void |
processArguments(java.lang.String[] args)
Processes a series of arguments. |
void |
reset()
Resets the object to its initial state (except for the PrintStream and the verbose condition). |
void |
setManifestFile(java.util.jar.Manifest manifest)
Sets the manifest file to use for JAR files. |
void |
setOutputFile(java.io.File target)
Sets the output file |
void |
setOutputFile(java.lang.String path)
Sets the output file to the given path. |
void |
setPrintStream(java.io.PrintStream output)
Sets the output stream for messages. |
void |
setVerbose(boolean verbose)
Makes the processes to print debug information if the argument is true. |
static java.lang.Object |
sourceFind(java.io.File source,
java.lang.String filename)
Whether the given directory or compressed (ZIP or JAR) file contains a file with that name under it (at any level) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MiniJar()
public MiniJar(java.lang.String[] args)
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- public static void freeMemory()
public void reset()
public void processArguments(java.lang.String[] args)
args
- public void setPrintStream(java.io.PrintStream output)
output
- public void setVerbose(boolean verbose)
verbose
- public void setOutputFile(java.lang.String path)
path
- The path for the desired compressed file, which must end with either ".zip" or ".jar".public void setOutputFile(java.io.File target)
file
- The desired output file, its name should end with either ".zip" or ".jar".public void setManifestFile(java.util.jar.Manifest manifest)
manifest
- createManifest(String, String)
public void addSourcePath(java.lang.String path)
path
- public void addClasspath(java.lang.String path)
path
- public void addExclude(java.lang.String pattern)
public void addExclude(java.io.File compressedFile)
public void addForced(java.lang.String pattern)
pattern
- public void addDesired(java.lang.String pattern)
pattern
- public void addDesiredFrom(java.lang.String pattern, java.lang.String path)
pattern
- public java.util.Set<java.lang.String> compress()
public java.util.Set<java.lang.String> compress(java.util.Set<PathAndFile> matches)
public java.util.Set<PathAndFile> getMatches()
public java.util.Set<java.lang.String> getMissingFilesList()
public static boolean compress(java.util.Set<PathAndFile> list, java.io.File target, java.util.jar.Manifest manifest)
list
- List The list of target
- File The output filemanifest
- Manifest The manifest (in case of a JAR file)
public static java.lang.Object sourceFind(java.io.File source, java.lang.String filename)
source
- File The directory or compressed filefilename
- String The path of the file to extract
public static java.util.jar.Manifest createManifest(java.lang.String classpath, java.lang.String mainclass)
classpath
- Stringmainclass
- String
public static java.util.jar.Manifest createManifest(java.lang.String classpath, java.lang.String mainclass, java.util.Set<java.lang.String> extraInfo)
classpath
- Stringmainclass
- String
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |