@Test public void testMaxOfUnsigned() { assertThat(maxOfUnsigned(1), is(BigInteger.valueOf(0xff))); assertThat(maxOfUnsigned(2), is(BigInteger.valueOf(0xffff))); assertThat(maxOfUnsigned(4), is(BigInteger.valueOf(0xffffffffL))); assertThat(maxOfUnsigned(8), is(new BigInteger("+ffffffffffffffff", 16))); assertThat(maxOfUnsigned(16), is(new BigInteger("+ffffffffffffffffffffffffffffffff", 16))); }
public static BigInteger maxOfUnsigned(int size) { return new BigInteger("+ff" + StringUtils.repeat("ff", size - 1), 16); }
BigIntegerUtils { public static BigInteger maxOfUnsigned(int size) { return new BigInteger("+ff" + StringUtils.repeat("ff", size - 1), 16); } }
BigIntegerUtils { public static BigInteger maxOfUnsigned(int size) { return new BigInteger("+ff" + StringUtils.repeat("ff", size - 1), 16); } private  BigIntegerUtils(); }
BigIntegerUtils { public static BigInteger maxOfUnsigned(int size) { return new BigInteger("+ff" + StringUtils.repeat("ff", size - 1), 16); } private  BigIntegerUtils(); static byte[] toLittleEndian(BigInteger integer, int sizeInBytes); static BigInteger asSignedLittleEndian(byte[] bytes); static BigInteger asUnsignedLittleEndian(byte[] bytes); static BigInteger minOfSigned(int size); static BigInteger maxOfSigned(int size); static BigInteger maxOfUnsigned(int size); static String toHexString(BigInteger integer, int size); }
BigIntegerUtils { public static BigInteger maxOfUnsigned(int size) { return new BigInteger("+ff" + StringUtils.repeat("ff", size - 1), 16); } private  BigIntegerUtils(); static byte[] toLittleEndian(BigInteger integer, int sizeInBytes); static BigInteger asSignedLittleEndian(byte[] bytes); static BigInteger asUnsignedLittleEndian(byte[] bytes); static BigInteger minOfSigned(int size); static BigInteger maxOfSigned(int size); static BigInteger maxOfUnsigned(int size); static String toHexString(BigInteger integer, int size);  }