code: public static boolean equalIncreasingByteBuffer(int start, int len, ByteBuffer buf) {
      if (buf == null) {
        return false;
      }
      buf.rewind();
      if (buf.remaining() != len) {
        return false;
      }
      for (int k = 0; k < len; k++) {
        if (buf.get() != (byte) (start + k)) {
          return false;
        }
      }
      return true;
    }
docs: Checks if the given {@link ByteBuffer} starts with an increasing sequence of bytes starting at
  the given value of length equal to or greater than the given length.
  
  @param start the starting value to use
  @param len the target length of the sequence
  @param buf the ByteBuffer to check
  @return true if the ByteBuffer has a prefix of length {@code len} that is an increasing
  sequence of bytes starting at {@code start}