public static < T > String writeObjectToString ( final T entity ) { ByteArrayOutputStream destination = new ByteArrayOutputStream ( ) ; writeObject ( entity , destination , null ) ; return destination . toString ( ) ; }
Write XML entity to the string .