You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Richard Frazer <Ri...@haht.com> on 2002/09/09 20:38:17 UTC
patch for org.apache.fop.apps.Options
Here's a patch so that the Options class can take an InputStream for a user
config instead of a File object. I found this useful when templating my
config file and replacing macros before passing it into the Options
constructor. Please submit if you find it useful.
42a43,46
> public Options(InputStream userConfig) throws FOPException {
> this();
> this.loadUserconfiguration(userConfig);
> }
140a145,159
> }
>
> public void loadUserconfiguration(InputStream userConfig) {
> ConfigurationReader reader =
> new ConfigurationReader(new InputSource(userConfig));
> if (errorDump) {
> reader.setDumpError(true);
> }
> try {
> reader.start();
> } catch (org.apache.fop.apps.FOPException error) {
> if (errorDump) {
> reader.dumpError(error);
> }
> }