public long appended() {
        return buffer.appended();
    }
Return the number of bytes this writer will produce for the underlying
layer. That is, it sums the length of the raw bytes received and the
number of bytes in the written strings after encoding.

@return the number of bytes appended to this writer
vespajlib/src/main/java/com/yahoo/io/AbstractByteWriter.java