void continuousCheck(List<DataBlockIndex> newIndexes) {
        for (DataBlockIndex index : newIndexes) {
            if (expectStreamId == Constants.NOOP_STREAM_ID) {
                expectStreamId = index.streamId();
                startOffset = index.startOffset();
            } else {
                if (expectStreamId != index.streamId() || expectOffset != index.startOffset()) {
                    throw new IllegalArgumentException(String.format("Invalid index %s, expect streamId=%s, offset=%s",
                        index, expectStreamId, expectOffset));
                }
            }
            expectOffset = index.endOffset();
        }
    }
Return the retained size of the object.
For example, the composite object contains obj1 with size=10MiB and obj2 with size=20MiB, then the retained size is 30MiB
s3stream/src/main/java/com/automq/stream/s3/CompositeObjectWriter.java