public List<ObjectStreamRange> getStreamRanges() {
            List<ObjectStreamRange> streamRanges = new LinkedList<>();
            ObjectStreamRange lastStreamRange = null;
            for (DataBlock block : completedBlocks) {
                ObjectStreamRange streamRange = block.getStreamRange();
                if (lastStreamRange == null || lastStreamRange.getStreamId() != streamRange.getStreamId()) {
                    if (lastStreamRange != null) {
                        streamRanges.add(lastStreamRange);
                    }
                    lastStreamRange = new ObjectStreamRange();
                    lastStreamRange.setStreamId(streamRange.getStreamId());
                    lastStreamRange.setEpoch(streamRange.getEpoch());
                    lastStreamRange.setStartOffset(streamRange.getStartOffset());
                }
                lastStreamRange.setEndOffset(streamRange.getEndOffset());
            }
            if (lastStreamRange != null) {
                streamRanges.add(lastStreamRange);
            }
            return streamRanges;
        }
Create a new object writer.

@param objectId           object id
@param objectStorage      S3 operator
@param blockSizeThreshold the max size of a block
@param partSizeThreshold  the max size of a part. If it is smaller than {@link Writer#MIN_PART_SIZE}, it will be set to {@link Writer#MIN_PART_SIZE}.
@param writeOptions       the object storage write options
s3stream/src/main/java/com/automq/stream/s3/ObjectWriter.java