public static long decodeUnsignedLong(ByteBuffer buffer){
  long value=0L;
  int i=0;
  long bytevalue;
  while (((bytevalue=buffer.get()) & 0x80L) != 0) {
    value|=(bytevalue & 0x7f) << i;
    i+=7;
    Preconditions.checkArgument(i <= 63,"Variable length quantity is too long");
  }
  return value | (bytevalue << i);
}

public static long decodeUnsignedLong ( ByteBuffer buffer ) { long value = 0L ; int i = 0 ; long bytevalue ; while ( ( ( bytevalue = buffer . get ( ) ) & 0x80L ) != 0 ) { value |= ( bytevalue & 0x7f ) << i ; i += 7 ; Preconditions . checkArgument ( i <= 63 , "Variable length quantity is too long" ) ; } return value | ( bytevalue << i ) ; }
decode a varint encoded unsigned long value stored in a bytebuffer .
