public byte[] toBytecode() throws IOException, CannotCompileException {
  ByteArrayOutputStream barray=new ByteArrayOutputStream();
  DataOutputStream out=new DataOutputStream(barray);
  try {
    toBytecode(out);
  }
  finally {
    out.close();
  }
  return barray.toByteArray();
}

public byte [ ] toBytecode ( ) throws IOException , CannotCompileException { ByteArrayOutputStream barray = new ByteArrayOutputStream ( ) ; DataOutputStream out = new DataOutputStream ( barray ) ; try { toBytecode ( out ) ; } finally { out . close ( ) ; } return barray . toByteArray ( ) ; }
converts this class to a class file . once this method is called , further modifications are not possible any more .
