org.jaitools.demo.jiffle
Class JiffleDemoHelper

java.lang.Object
  extended by org.jaitools.demo.jiffle.JiffleDemoHelper

public class JiffleDemoHelper
extends java.lang.Object

Helper class with for Jiffle demo applications.

Since:
1.1
Version:
$Id: JiffleDemoHelper.java 1654 2011-06-16 10:46:55Z michael.bedward $
Author:
Michael Bedward

Constructor Summary
JiffleDemoHelper()
           
 
Method Summary
static java.lang.String getScript(ImageChoice choice)
          Gets an example script.
static java.io.File getScriptFile(java.lang.String[] args, ImageChoice defaultScript)
          Gets a file specified in the command line args, or the default example image if no name is supplied.
static java.lang.String readScriptFile(java.io.File scriptFile)
          Reads the contents of a script file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JiffleDemoHelper

public JiffleDemoHelper()
Method Detail

getScript

public static java.lang.String getScript(ImageChoice choice)
                                  throws JiffleException
Gets an example script.

Parameters:
choice - specifies the example script
Throws:
JiffleException - on errors getting the script file

getScriptFile

public static java.io.File getScriptFile(java.lang.String[] args,
                                         ImageChoice defaultScript)
                                  throws JiffleException
Gets a file specified in the command line args, or the default example image if no name is supplied.

Parameters:
args - command lines args passed from an application
defaultScript - default example script
Returns:
the script file
Throws:
JiffleException - on problems getting the file

readScriptFile

public static java.lang.String readScriptFile(java.io.File scriptFile)
                                       throws JiffleException
Reads the contents of a script file.

Parameters:
scriptFile - the file
Returns:
the script as a String
Throws:
JiffleException - on problems reading the file


Copyright © 2011. All Rights Reserved.