|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rice.cs.util.jar.JarBuilder
public class JarBuilder
Constructor Summary | |
---|---|
JarBuilder(File file)
Creates a file file without a manifest |
|
JarBuilder(File jar,
File manifest)
Creates an empty jar file with the given manifest |
|
JarBuilder(File jar,
Manifest manifest)
Creates an empty jar file with the given manifest |
Method Summary | |
---|---|
void |
addDirectoryRecursive(File dir,
String parent)
Add the directory into the directory specified by parent |
void |
addDirectoryRecursive(File dir,
String parent,
FileFilter filter)
Add the directory into the directory specified by parent |
void |
addFile(File file,
String parent,
String fileName)
Adds the file to the given path and name |
void |
close()
Close writing on the jar file |
boolean |
makeDirectory(String parent,
String dirName)
Makes a directory in the jar file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarBuilder(File file) throws IOException
file
- the file to write the jar to
IOException
- thrown if the file cannot be opened for writingpublic JarBuilder(File jar, File manifest) throws IOException
jar
- the file to write the jar tomanifest
- the file that is the manifest for the archive
IOException
- thrown if either file cannot be opened for readingpublic JarBuilder(File jar, Manifest manifest)
jar
- the file to write the jar tomanifest
- the manifest file for the jarManifestWriter
Method Detail |
---|
public void addFile(File file, String parent, String fileName) throws IOException
file
- the file to be addedparent
- the directory to the path in which the file is to be addedfileName
- the name of the file in the archive
IOException
public void addDirectoryRecursive(File dir, String parent)
dir
- the directory to addparent
- the path inside the jar that the directory should be added topublic void addDirectoryRecursive(File dir, String parent, FileFilter filter)
dir
- the directory to addparent
- the path inside the jar that the directory should be added tofilter
- the filter used to filter the filespublic boolean makeDirectory(String parent, String dirName)
parent
- The name of the parent that the directory is to be created indirName
- The name of the directory to be created
public void close() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |