// check arguments
affirm(inByteCode, "Illegal argument: inByteCode == null.");//NOI18N
affirm(outByteCode, "Illegal argument: outByteCode == null.");//NOI18N
// parse class
final ClassFileSource cfs;
final ClassFile cf;
final ClassControl cc;
try {
// create class file source
cfs = new ClassFileSource(null, inByteCode);
// create class file
final DataInputStream dis = cfs.classFileContents();
cf = new ClassFile(dis);
//@lars: do not close the input stream
// dis.close();
// create class control
cc = new ClassControl(cfs, cf, env);
env.addClass(cc);
// get real class name
final String className = cc.className();
cfs.setExpectedClassName(className);
} catch (IOException ex) {
//@olsen: support for I18N
throw new UserException(
getI18N("enhancer.io_error_while_reading_stream"),//NOI18N
ex);