* @see de.netseeker.ejoe.adapter.SerializeAdapter#write(java.lang.Object, java.io.OutputStream)
*/
public void write( Object obj, OutputStream out ) throws Exception
{
Writer writer = new OutputStreamWriter( out, EJConstants.EJOE_DEFAULT_CHARSET );
Marshaller marshaller = new Marshaller( writer );
try
{
if ( _mapping != null )
{
marshaller.setMapping( _mapping );
}
// marshaller.setResolver(_cdr);
marshaller.setValidation( false );
marshaller.setSuppressXSIType( false );
marshaller.setUseXSITypeAtRoot( true );
marshaller.setMarshalExtendedType( true );
marshaller.setResolver( _cdr );
marshaller.marshal( obj );
}
finally
{
IOUtil.closeQuiet( writer );
}