code: public static long decodeUnsignedLong(byte[] buf, int ofs, int len) throws IllegalArgumentException {
          if (ofs < 0 || len < 0 || ofs + len < 0 || ofs + len > buf.length) {
              throw new IndexOutOfBoundsException();
          }
          if (len > 8 || len == 8 && buf[ofs] < 0) {
              throw new IllegalArgumentException("Integers of at most 63 unsigned bits supported by this implementation");
          }
          long t = 0;
          for (int i = 0; i < len; ++i) {
              t = (t << 8) | ((long) buf[ofs + i] & 0xff);
          }
          return t;
      }
docs: Decodes an unsigned integer from the given buffer.
  
  @param buf
  the buffer.
  @param ofs
  offset of the data in the buffer.
  @param len
  length of the data to decode.
  
  @return The decoded value.
  
  @throws IllegalArgumentException
  when result does not fit into 63-bit unsigned integer.