Class JarFileCommitter
java.lang.Object
EDU.purdue.cs.bloat.file.ClassFileLoader
EDU.purdue.cs.bloat.file.JarFileCommitter
- All Implemented Interfaces:
ClassInfoLoader
Does a lot of the same stuff as ClassFileLoader, but classes are
committed to a JAR file instead of regular files.
-
Field Summary
Fields inherited from class ClassFileLoader
DEBUG, USE_SYSTEM_CLASSES -
Constructor Summary
ConstructorsConstructorDescriptionJarFileCommitter(File file, boolean compress, String version, String author) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoiddone()Signifies that we are finished with this JarFileCommitter.outputStreamFor(ClassInfo info) Returns an OutputStream to which a class file should be written.protected OutputStreamoutputStreamFor(String name) Returns anOutputStreamto which somed named entity is written.Methods inherited from class ClassFileLoader
appendClassPath, getClassPath, loadClass, loadClassesFromZipFile, newClass, outputDir, prependClassPath, setClassPath, setOutputDir, setVerbose, writeEntry
-
Constructor Details
-
JarFileCommitter
public JarFileCommitter(File file, boolean compress, String version, String author) throws IOException Constructor.- Parameters:
file- File representing JAR filecompress- If true, contents of JAR file is compressedversion- Version for the JAR file's manifestauthor- Author string from JAR file's manifest- Throws:
IOException
-
-
Method Details
-
outputStreamFor
Description copied from class:ClassFileLoaderReturns anOutputStreamto which somed named entity is written. Any forward slashes in the name are replaced byFile.separatorChar.- Overrides:
outputStreamForin classClassFileLoader- Throws:
IOException
-
outputStreamFor
Description copied from class:ClassFileLoaderReturns an OutputStream to which a class file should be written.- Specified by:
outputStreamForin interfaceClassInfoLoader- Overrides:
outputStreamForin classClassFileLoader- Throws:
IOException
-
done
Signifies that we are finished with this JarFileCommitter.- Overrides:
donein classClassFileLoader- Throws:
IOException
-