(File file)
| 20 | } |
| 21 | |
| 22 | private static byte[] read(File file) throws IOException { |
| 23 | byte[] bytes = new byte[(int) file.length()]; |
| 24 | FileInputStream in = new FileInputStream(file); |
| 25 | try { |
| 26 | if (in.read(bytes) != (int) file.length()) { |
| 27 | throw new RuntimeException(); |
| 28 | } |
| 29 | return bytes; |
| 30 | } finally { |
| 31 | in.close(); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | private static Class loadClass(String name) throws Exception { |
| 36 | return new MyClassLoader(DefineClass.class.getClassLoader()).defineClass |