@Override
    public void close() throws IOException {
        flush();
        closed = true;
    }
An {@link OutputStream} that uses {@link ByteBuf} to accumulate stream data before flushing to the
designated {@link Consumer}.
resteasy/src/main/java/com/linecorp/armeria/internal/common/resteasy/ByteBufferBackedOutputStream.java