public boolean hasWritten() {
        return buffer.writerIndex() > 0;
    }
Indicates whether of the underlying buffer has any content written.
resteasy/src/main/java/com/linecorp/armeria/internal/common/resteasy/ByteBufferBackedOutputStream.java