public class ClassFileWriter extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
writeToByteArray(ClassFile classFile)
Converts a ClassFile structure to a byte array.
|
static void |
writeToFile(File file,
ClassFile classFile)
Converts a ClassFile structure to a class file.
|
public static void writeToFile(File file, ClassFile classFile) throws InvalidByteCodeException, IOException
file
- the file to which to write the ClassFile structureclassFile
- the ClassFile structure to be writtenInvalidByteCodeException
- if the code is invalidIOException
- if an exception occurs while reading the filepublic static byte[] writeToByteArray(ClassFile classFile) throws InvalidByteCodeException, IOException
classFile
- the class fileInvalidByteCodeException
IOException