On 21.03.2006 16:01:40 Chris Bowditch wrote:
<snip/>
> > Removing the reflection code from Jess' example, it looks like this:
> >
> > Fop fop = new Fop("application/pdf");
> > fop.setOutputStream(out);
> > DefaultHandler defaultHandler = fop.getDefaultHandler();
> >
> > With the revised API, this will need to be changed to this:
> >
> > Fop fop = FopFactory.newInstance().newFop("application/pdf", out);
> > DefaultHandler defaultHandler = fop.getDefaultHandler();
> >
> > Simon's deprecating setOutputStream() gives me the impression that he'd
> > be in favor of that, too, but obviously I can't speak for him. But it
> > points in the same direction.
>
> Whats the proposed replacement for setOutputStream() before I decide on
> my vote here? (The Wiki shows examples with it in)
Whoops, the example wasn't updated. Just done that:
http://wiki.apache.org/xmlgraphics-fop/ApiDesign
The OutputStream is now set in the factory methods on the FopFactory as
indicated above. This basically leaves the Fop class with three public
methods:
- getUserAgent()
- getDefaultHandler()
- getResults()
Jeremias Maerki