WFLY-1372 Don't write out marshalled object 1 byte at a time