diff -r e078953818d2 -r 86f3ea771e24 vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java --- a/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Dec 20 11:03:34 2012 +0100 +++ b/vmtest/src/main/java/org/apidesign/bck2brwsr/vmtest/VMTest.java Thu Dec 20 21:54:33 2012 +0100 @@ -20,10 +20,7 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; import java.lang.reflect.Method; -import java.net.URL; -import java.util.Enumeration; import java.util.Map; import java.util.WeakHashMap; import java.util.logging.Level; @@ -111,37 +108,6 @@ return m.getName() + "[Compare " + second.typeName() + "]"; } - /** Helper method that inspects the classpath and loads given resource - * (usually a class file). Used while running tests in Rhino. - * - * @param name resource name to find - * @return the array of bytes in the given resource - * @throws IOException I/O in case something goes wrong - */ - public static byte[] read(String name) throws IOException { - URL u = null; - Enumeration en = VMTest.class.getClassLoader().getResources(name); - while (en.hasMoreElements()) { - u = en.nextElement(); - } - if (u == null) { - throw new IOException("Can't find " + name); - } - try (InputStream is = u.openStream()) { - byte[] arr; - arr = new byte[is.available()]; - int offset = 0; - while (offset < arr.length) { - int len = is.read(arr, offset, arr.length - offset); - if (len == -1) { - throw new IOException("Can't read " + name); - } - offset += len; - } - return arr; - } - } - public static final class Run implements ITest { private final Method m; private final int type;