{
try {
DynamicByteArrayOutputStream dbaos = new DynamicByteArrayOutputStream();
FormatIdOutputStream fios = new FormatIdOutputStream( dbaos );
fios.writeObject( td );
dbaos.flush();
byte[] rawResult = dbaos.getByteArray();
int count = dbaos.getUsed();