code: @Override public long indexOf(byte b, long fromIndex) {
      if (fromIndex < 0) throw new IllegalArgumentException("fromIndex < 0");
  
      Segment s = head;
      if (s == null) return -1L;
      long offset = 0L;
      do {
        int segmentByteCount = s.limit - s.pos;
        if (fromIndex >= segmentByteCount) {
          fromIndex -= segmentByteCount;
        } else {
          byte[] data = s.data;
          for (int pos = (int) (s.pos + fromIndex), limit = s.limit; pos < limit; pos++) {
            if (data[pos] == b) return offset + pos - s.pos;
          }
          fromIndex = 0;
        }
        offset += segmentByteCount;
        s = s.next;
      } while (s != head);
      return -1L;
    }
docs: Returns the index of {@code b} in this at or beyond {@code fromIndex}, or
  -1 if this buffer does not contain {@code b} in that range.