+ ".class";
// Have ClassPath find the file for us, and wrap it in a
// ClassFile. Note: This is where it looks inside jar files that
// are specified in the path.
ClassFile classFile = classPath.getFile(filename);
if (classFile != null) {
// Provide the most specific reason for failure in addition
// to ClassNotFound
Exception reportedError = null;
byte data[] = null;
try {
// ClassFile is beautiful because it shields us from
// knowing if it's a separate file or an entry in a
// jar file.
DataInputStream input
= new DataInputStream(classFile.getInputStream());
// Can't rely on input available() since it will be
// something unusual if it's a jar file! May need
// to worry about a possible problem if someone
// makes a jar file entry with a size greater than
// max int.
data = new byte[(int)classFile.length()];
try {
input.readFully(data);
} catch (IOException ex) {
// Something actually went wrong reading the file. This