Bug 315315 Warning messages seen while starting up workbench
chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/impl/SerializerImpl.java
Map<String, Object> options = new HashMap<String, Object>( );
		options.put( XMLResource.OPTION_ENCODING, "UTF-8" ); 
		if ( bStripHeaders )
		{
			options.put( XMLResource.OPTION_DECLARE_XML, Boolean.FALSE );
		}
		
		rChart.save( baos, options );
		return baos;
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.birt.chart.model.Serializer#savePreferences(org.eclipse.birt
	 * .chart.model.component.ChartPreferences, java.io.OutputStream)
	 */
	public void savePreferences( ChartPreferences preferences, OutputStream os )
			throws IOException
	{
		
		ResourceSet rsChart = new ResourceSetImpl( );
		rsChart.getResourceFactoryRegistry( )
				.getExtensionToFactoryMap( )
				.put( "chart", new ModelResourceFactoryImpl( ) ); 
		
		
		Resource rChart = rsChart.createResource( URI.createFileURI( "test.chart" ) ); 
		
		rChart.getContents( ).add( preferences );