Gets the byte serialization for this writer. Note that this will call endDocument first, closing all open tags.