vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java
brancharithmetic
changeset 629 2d537f8cd604
parent 628 e606853325f1
child 630 04e312a7887e
     1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java	Thu Jan 31 20:37:12 2013 +0100
     1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java	Fri Feb 01 06:09:18 2013 +0100
     1.3 @@ -112,6 +112,12 @@
     1.4          return (disValue.readLong() >> nBits);
     1.5      }
     1.6      
     1.7 +    public static long ushrL(byte[] arrValue, int nBits) throws IOException {
     1.8 +        ByteArrayInputStream isValue = new ByteArrayInputStream(arrValue);
     1.9 +        DataInputStream disValue = new DataInputStream(isValue);
    1.10 +        return (disValue.readLong() >>> nBits);
    1.11 +    }
    1.12 +    
    1.13      public static long andL(byte[] arrX, byte[] arrY) throws IOException {
    1.14          ByteArrayInputStream isX = new ByteArrayInputStream(arrX);
    1.15          DataInputStream disX = new DataInputStream(isX);