private void doWriteObjectWithType(final Object value, final TypeReader reader) throws Exception
{
HornetQStreamMessage message = new HornetQStreamMessage();
message.writeObject(value);
message.reset();
Object v = reader.readType(message);
if (value instanceof byte[])
{