code: public byte getByte(long pos) {
      checkOffsetAndCount(size, pos, 1);
      for (Segment s = head; true; s = s.next) {
        int segmentByteCount = s.limit - s.pos;
        if (pos < segmentByteCount) return s.data[s.pos + (int) pos];
        pos -= segmentByteCount;
      }
    }
docs: Returns the byte at {@code pos}.