Public Member Functions | Package Functions

alma.acs.makesupport.JarSourceExtractor Class Reference

Inheritance diagram for alma.acs.makesupport.JarSourceExtractor:
alma.acs.makesupport.AbstractJarEntryExtractor

List of all members.

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

Detailed Description

Author:
hsommer created Sep 16, 2003 4:24:41 PM

Constructor & Destructor Documentation

alma.acs.makesupport.JarSourceExtractor.JarSourceExtractor (  ) 

Member Function Documentation

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.

Parameters:
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
Exceptions:
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.

Parameters:
jarfile jar file from which Java source will be extracted
outDir root dir under which the extracted java files will be placed
Exceptions:
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.

Parameters:
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.)
Exceptions:
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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties