Object value = services.getOption( RenderOptionBase.OUTPUT_STREAM ); if(value!=null && value instanceof OutputStream) { out = (OutputStream)value; }
	public void initialize( IEmitterServices services )	{		this.services = services;		Object value = services.getOption( RenderOptionBase.OUTPUT_STREAM );		if(value!=null && value instanceof OutputStream)		{			out = (OutputStream)value;		}		Object fd = services.getOption( RenderOptionBase.OUTPUT_FILE_NAME );		File file = null;		try		{			if(fd!=null)			{				file = new File(fd.toString());				out = new BufferedOutputStream( new FileOutputStream( file ) );			}			else			{				if(out==null)				{					//FIXME					file = new File(REPORT_FILE) ;					out = new BufferedOutputStream( new FileOutputStream( file ) );				}			}		}		catch (FileNotFoundException e)		{			// FIXME			logger.log(Level.SEVERE, e.getMessage(), e);		}						Object emitterConfig = services.getEmitterConfig().get("html"); //$NON-NLS-1$		if(emitterConfig!=null && emitterConfig instanceof HTMLEmitterConfig)		{			imageHandler = ((HTMLEmitterConfig)emitterConfig).getImageHandler();			actionHandler = ((HTMLEmitterConfig)emitterConfig).getActionHandler();		}				Object im = services.getOption(HTMLRenderOption.IMAGE_HANDLER);		if(im!=null && im instanceof IHTMLImageHandler)		{			imageHandler = (IHTMLImageHandler)im;		}				Object ac = services.getOption(HTMLRenderOption.ACTION_HANDLER);		if(ac!=null && ac instanceof IHTMLActionHandler)		{			actionHandler = (IHTMLActionHandler)ac;		}						renderContext = services.getRenderContext();		renderOption = services.getRenderOption();		runnable = services.getReportRunnable();		HTMLRenderOption renderOption = (HTMLRenderOption)services.getRenderOption();		if(renderOption!=null)		{			isEmbeddable = renderOption.getEmbeddable();		}		writer = new HTMLWriter( );		imageEmitter = new HTMLImageEmitter( this, isEmbeddable );		pageSetupEmitter = new HTMLPageSetupEmitter( this, isEmbeddable );		tableEmitter = new HTMLTableEmitter( this, isEmbeddable );		textEmitter = new HTMLTextEmitter( this, isEmbeddable );		containerEmitter = new HTMLContainerEmitter( this, isEmbeddable );	}