private StreamOffsetRange findStreamOffsetRange(List<StreamOffsetRange> ranges, long streamId) {
        for (StreamOffsetRange range : ranges) {
            if (range.streamId() == streamId) {
                return range;
            }
        }
        return null;
    }
Check for continuity of stream range and range matching.
Note: insufficient range is possible and caller should retry after
metadata/src/main/java/org/apache/kafka/image/S3StreamsMetadataImage.java