Package com.tonic.util
Class ClassFileUtil
- java.lang.Object
-
- com.tonic.util.ClassFileUtil
-
public class ClassFileUtil extends Object
Utility class for working with Java class files.
-
-
Constructor Summary
Constructors Constructor Description ClassFileUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsaveClassFile(byte[] classBytes, String directoryPath, String className)Saves a byte array as a .class file in the specified directory.
-
-
-
Method Detail
-
saveClassFile
public static void saveClassFile(byte[] classBytes, String directoryPath, String className) throws IOExceptionSaves a byte array as a .class file in the specified directory.- Parameters:
classBytes- the byte array representing the class file contentdirectoryPath- the path to the directory where the .class file should be savedclassName- the fully qualified name of the class (e.g., "com.tonic.ANewClass")- Throws:
IOException- if an I/O error occurs during writingIllegalArgumentException- if the className is null or empty
-
-