Code example for BigInteger

Methods: longValue

0
     * 
     * @param bb ByteBuffer to put the long into 
     * @param v the BigInteger containing the unsigned long 
     */ 
    public static void putUnsignedLong(ByteBuffer bb, BigInteger v) {
        bb.putLong(v.longValue());
    } 
 
    /** 
     * Put an unsigned long into the specified ByteBuffer at the specified 
     * offset 
     * 
     * @param bb  ByteBuffer to put the long into 
     * @param v the BigInteger containing the unsigned long 
     * @param offset the offset to insert the unsigned long at 
     */ 
    public static void putUnsignedLong(ByteBuffer bb, BigInteger v, int offset) {
        bb.putLong(offset, v.longValue());
    } 
}