public class JarSourceExtractor extends AbstractJarEntryExtractor
FILETYPE, PREFIX_PATHS| Constructor and Description |
|---|
JarSourceExtractor() |
| Modifier and Type | Method and Description |
|---|---|
void |
extractJavaSourcesToFiles(java.util.jar.JarFile jarfile,
java.io.File outDir)
Extracts Java source files from a JAR file and puts them as individual files
under a given directory.
|
void |
extractJavaSourcesToJar(java.util.jar.JarFile jarfile,
java.util.jar.JarOutputStream jarOut)
Extracts Java source files from a JAR file and adds them to another JAR file.
|
getClassName, getJavaEntriespublic void extractJavaSourcesToFiles(java.util.jar.JarFile jarfile,
java.io.File outDir)
throws java.io.IOException
jarfile - jar file from which Java source will be extractedoutDir - root dir under which the extracted java files will be placedjava.io.IOExceptionpublic void extractJavaSourcesToJar(java.util.jar.JarFile jarfile,
java.util.jar.JarOutputStream jarOut)
throws java.io.IOException
jarfile - jar file from which Java source will be extractedjarOut - JAR output stream to which the extracted java files will be written;
jarOut is left open by this method, so that the client
can either call it again, or call jarOut.close() when it's done.
(there are problems with re-opening and adding entries to a Jar file.)java.io.IOException