Package com.peterhi.latest

Examples of com.peterhi.latest.Length


      (long )Integer.MAX_VALUE + 1,
      (long )Math.pow(2, 62) - 1,
    };
   
    for (long value : values) {
      Length a = new Length(value);
      int[] length = new int[1];
      Length b = Length.fromByteArray(a.toByteArray(), 0, length);
      assertEquals(a, b);
     
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      a.toStream(out);
      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      Length c = Length.fromStream(in, length);
      assertEquals(a, c);
    }
  }
View Full Code Here

TOP

Related Classes of com.peterhi.latest.Length

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.