diff options
-rw-r--r-- | src/java/org/apache/fop/apps/CommandLineOptions.java | 19 | ||||
-rw-r--r-- | src/java/org/apache/fop/apps/Fop.java | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/apps/CommandLineOptions.java b/src/java/org/apache/fop/apps/CommandLineOptions.java index a2e8ebd9e..e344078ff 100644 --- a/src/java/org/apache/fop/apps/CommandLineOptions.java +++ b/src/java/org/apache/fop/apps/CommandLineOptions.java @@ -72,13 +72,9 @@ public class CommandLineOptions implements Constants { private Vector xsltParams = null; /** - * Construct a command line option object from command line arguments - * @param args command line parameters - * @throws FOPException for general errors - * @throws FileNotFoundException if an input file wasn't found - * @throws IOException if the the configuration file could not be loaded + * Construct a command line option object. */ - public CommandLineOptions(String[] args) throws FOPException, IOException { + public CommandLineOptions() { LogFactory logFactory = LogFactory.getFactory(); // Enable the simple command line logging when no other logger is @@ -90,11 +86,16 @@ public class CommandLineOptions implements Constants { } log = LogFactory.getLog("FOP"); - - parse(args); } - private void parse(String[] args) + /** + * Parse the command line arguments. + * @param args the command line arguments. + * @throws FOPException for general errors + * @throws FileNotFoundException if an input file wasn't found + * @throws IOException if the the configuration file could not be loaded + */ + public void parse(String[] args) throws FOPException, IOException { boolean optionsParsed = true; diff --git a/src/java/org/apache/fop/apps/Fop.java b/src/java/org/apache/fop/apps/Fop.java index b9b52ec43..90fb83d39 100644 --- a/src/java/org/apache/fop/apps/Fop.java +++ b/src/java/org/apache/fop/apps/Fop.java @@ -138,7 +138,8 @@ public class Fop implements Constants { BufferedOutputStream bos = null; try { - options = new CommandLineOptions(args); + options = new CommandLineOptions(); + options.parse(args); foUserAgent = options.getFOUserAgent(); Fop fop = new Fop(options.getRenderer(), foUserAgent); |