Public Member Functions | |
JarSourceExtractor () | |
void | extractJavaSourcesToFiles (JarFile jarfile, File outDir) throws IOException |
void | extractJavaSourcesToJar (JarFile jarfile, JarOutputStream jarOut) throws IOException |
JarEntry[] | getJavaEntries (JarFile jarfile) |
Static Public Attributes | |
final String[] | PREFIX_PATHS = new String[] {"src", "test"} |
Package Functions | |
void | extract (JarFile jarfile, JarEntry entry, OutputStream out) throws IOException |
Private Member Functions | |
String | getClassName (JarEntry javaEntry) |
|
|
|
Extracts a file from a JAR file and writes it to an output stream. Does not close the output stream.
|
|
Extracts Java source files from a JAR file and puts them as individual files under a given directory.
|
|
Extracts Java source files from a JAR file and adds them to another JAR file.
|
|
Gets the Java class name from a JarEntry. Uses PREFIX_PATHS to remove a leading prefix path that is not part of the Java package.
|
|
Lists all Java source files that are contained inside a given JAR file. The current implementation only looks for a ".java" file ending, ignoring the contents of such files.
|
|
prefix paths inside JAR files which are not considered part of Java package paths |