docs: public byte[] getLastSegment() {
      if (segments.isEmpty()) {
        return null;
      }
      BufferSegment seg = segments.get(segments.size() - 1);
      return Arrays.copyOfRange(seg.buf, seg.offset, seg.offset + seg.len);
    }