Public Member Functions | |
JarSourceExtractor () | |
void | extractJavaSourcesToFiles (JarFile jarfile, File outDir) throws IOException |
void | extractJavaSourcesToJar (JarFile jarfile, JarOutputStream jarOut) throws IOException |
Package Functions | |
void | extract (JarFile jarfile, JarEntry entry, OutputStream out) throws IOException |
alma.acs.makesupport.JarSourceExtractor.JarSourceExtractor | ( | ) |
void alma.acs.makesupport.JarSourceExtractor.extract | ( | JarFile | jarfile, | |
JarEntry | entry, | |||
OutputStream | out | |||
) | throws IOException [package] |
Extracts a file from a JAR file and writes it to an output stream. Does not close the output stream.
jarfile | the jarfile from which to extract a file | |
entry | the entry (file) to be extracted from the jar file | |
out | the stream to write the entry to |
IOException | if the Jar file can't be read or the out stream can't be written to |
Referenced by alma.acs.makesupport.JarSourceExtractor.extractJavaSourcesToFiles(), and alma.acs.makesupport.JarSourceExtractor.extractJavaSourcesToJar().
void alma.acs.makesupport.JarSourceExtractor.extractJavaSourcesToFiles | ( | JarFile | jarfile, | |
File | outDir | |||
) | throws IOException |
Extracts Java source files from a JAR file and puts them as individual files under a given directory.
jarfile | jar file from which Java source will be extracted | |
outDir | root dir under which the extracted java files will be placed |
IOException |
References alma.acs.makesupport.JarSourceExtractor.extract(), alma.acs.makesupport.AbstractJarEntryExtractor.getClassName(), and alma.acs.makesupport.AbstractJarEntryExtractor.getJavaEntries().
void alma.acs.makesupport.JarSourceExtractor.extractJavaSourcesToJar | ( | JarFile | jarfile, | |
JarOutputStream | jarOut | |||
) | throws IOException |
Extracts Java source files from a JAR file and adds them to another JAR file.
jarfile | jar file from which Java source will be extracted | |
jarOut | 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.) |
IOException |
References alma.acs.makesupport.JarSourceExtractor.extract(), alma.acs.makesupport.AbstractJarEntryExtractor.getClassName(), and alma.acs.makesupport.AbstractJarEntryExtractor.getJavaEntries().
Referenced by alma.acs.makesupport.JarSourceExtractorRunner.main().