protected void initializeFilter( InputStream filterInput, OutputStream filterOutput)
    {
    try
      {
      // Create Transformer object.
      Source transform = getTransform();
      if( transform == null)
        {
        throw new IllegalStateException( "No XSLT transform specified");
        }
      TransformerFactory factory = TransformerFactory.newInstance();
      factory.setErrorListener( this);
      
      transformer_ = factory.newTransformer( transform);
      transformer_.setErrorListener( this);
      if( transformParams_ != null)
        {
        for( String paramName : transformParams_.keySet())
          {
          transformer_.setParameter( paramName, transformParams_.get( paramName));
          }
        }
      
      transformSource_ = new StreamSource( filterInput);
      transformResult_ = new StreamResult( filterOutput);
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't initialize filter", e);
      } 
    }
protected void initializeFilter ( InputStream filterInput , OutputStream filterOutput ) { try { Source transform = getTransform ( ) ; if ( transform == null ) { throw new IllegalStateException ( "No XSLT transform specified" ) ; } TransformerFactory factory = TransformerFactory . newInstance ( ) ; factory . setErrorListener ( this ) ; transformer_ = factory . newTransformer ( transform ) ; transformer_ . setErrorListener ( this ) ; if ( transformParams_ != null ) { for ( String paramName : transformParams_ . keySet ( ) ) { transformer_ . setParameter ( paramName , transformParams_ . get ( paramName ) ) ; } } transformSource_ = new StreamSource ( filterInput ) ; transformResult_ = new StreamResult ( filterOutput ) ; } catch ( Exception e ) { throw new RuntimeException ( "Can't initialize filter" , e ) ; } }
Initializes the filter.