final byte[] clazzBytes = pStore.read(pClazzName);
if (clazzBytes != null) {
final char[] fileName = pClazzName.toCharArray();
try {
final ClassFileReader classFileReader = new ClassFileReader(clazzBytes, fileName, true);
return new NameEnvironmentAnswer(classFileReader, null);
} catch (final ClassFormatException e) {
throw new RuntimeException( "ClassFormatException in loading class '" + fileName + "' with JCI." );
}
}
final InputStream is = pClassLoader.getResourceAsStream(resourceName);
if (is == null) {
return null;
}
final byte[] buffer = new byte[8192];
final ByteArrayOutputStream baos = new ByteArrayOutputStream(buffer.length);
int count;
try {
while ((count = is.read(buffer, 0, buffer.length)) > 0) {
baos.write(buffer, 0, count);
}
baos.flush();
final char[] fileName = pClazzName.toCharArray();
final ClassFileReader classFileReader = new ClassFileReader(baos.toByteArray(), fileName, true);
return new NameEnvironmentAnswer(classFileReader, null);
} catch ( final IOException e ) {
throw new RuntimeException( "could not read class",
e );
} catch ( final ClassFormatException e ) {