jaitools.demo.jiffle
Class JiffleDemoHelper

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

public class JiffleDemoHelper
extends Object

Helper class with for Jiffle demo applications.

Since:
1.1
Version:
$Id: JiffleDemoHelper.java 1592 2011-03-29 11:01:25Z michael.bedward $
Author:
Michael Bedward

Constructor Summary
JiffleDemoHelper()
           
 
Method Summary
static String getScript(ImageChoice choice)
          Gets an example script.
static File getScriptFile(String[] args, ImageChoice defaultScript)
          Gets a file specified in the command line args, or the default example image if no name is supplied.
static String readScriptFile(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 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 File getScriptFile(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 String readScriptFile(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.