diff -r 9cbf1f2ad7ee -r 960e219425e2 vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java --- a/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Thu Jan 31 13:42:14 2013 +0100 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Thu Jan 31 13:55:12 2013 +0100 @@ -95,4 +95,16 @@ public static long modL(long x, long y) { return (x % y); } + + public static long shlL(byte[] arrValue, int nBits) throws IOException { + ByteArrayInputStream isValue = new ByteArrayInputStream(arrValue); + DataInputStream disValue = new DataInputStream(isValue); + return (disValue.readLong() << nBits); + } + + public static long shrL(byte[] arrValue, int nBits) throws IOException { + ByteArrayInputStream isValue = new ByteArrayInputStream(arrValue); + DataInputStream disValue = new DataInputStream(isValue); + return (disValue.readLong() >> nBits); + } }