Package EDU.purdue.cs.bloat.file
Class JarFileCommitter
- java.lang.Object
-
- EDU.purdue.cs.bloat.file.ClassFileLoader
-
- EDU.purdue.cs.bloat.file.JarFileCommitter
-
- All Implemented Interfaces:
ClassInfoLoader
public class JarFileCommitter extends ClassFileLoader
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 EDU.purdue.cs.bloat.file.ClassFileLoader
DEBUG, USE_SYSTEM_CLASSES
-
-
Constructor Summary
Constructors Constructor Description JarFileCommitter(java.io.File file, boolean compress, java.lang.String version, java.lang.String author)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddone()Signifies that we are finished with this JarFileCommitter.java.io.OutputStreamoutputStreamFor(ClassInfo info)Returns an OutputStream to which a class file should be written.protected java.io.OutputStreamoutputStreamFor(java.lang.String name)Returns anOutputStreamto which somed named entity is written.-
Methods inherited from class EDU.purdue.cs.bloat.file.ClassFileLoader
appendClassPath, getClassPath, loadClass, loadClassesFromZipFile, newClass, outputDir, prependClassPath, setClassPath, setOutputDir, setVerbose, writeEntry
-
-
-
-
Constructor Detail
-
JarFileCommitter
public JarFileCommitter(java.io.File file, boolean compress, java.lang.String version, java.lang.String author) throws java.io.IOExceptionConstructor.- 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:
java.io.IOException
-
-
Method Detail
-
outputStreamFor
protected java.io.OutputStream outputStreamFor(java.lang.String name) throws java.io.IOExceptionDescription 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:
java.io.IOException
-
outputStreamFor
public java.io.OutputStream outputStreamFor(ClassInfo info) throws java.io.IOException
Description copied from class:ClassFileLoaderReturns an OutputStream to which a class file should be written.- Specified by:
outputStreamForin interfaceClassInfoLoader- Overrides:
outputStreamForin classClassFileLoader- Throws:
java.io.IOException
-
done
public void done() throws java.io.IOExceptionSignifies that we are finished with this JarFileCommitter.- Overrides:
donein classClassFileLoader- Throws:
java.io.IOException
-
-