Returns the number of bytes from the start up to including the last byte written in the stream that has not been truncated away.
a MemoryOutputStream
the number of bytes written to the stream