The im4java Library, Version 1.4.0

org.im4java.script
Class BashScriptGenerator

java.lang.Object
  extended by org.im4java.script.AbstractScriptGenerator
      extended by org.im4java.script.BashScriptGenerator
All Implemented Interfaces:
ScriptGenerator

public class BashScriptGenerator
extends AbstractScriptGenerator

This class implements a BashScriptGenerator.

Since:
1.0.0
Version:
$Revision: 1.7 $
Author:
$Author: bablokb $

Field Summary
 
Fields inherited from class org.im4java.script.AbstractScriptGenerator
ESC_EOL, ESC_SPECIAL, iArgIndex, iIndent, iLineBuffer, LINE_SIZE
 
Constructor Summary
BashScriptGenerator()
          The default constructor.
 
Method Summary
protected  java.lang.String getScriptArg(java.lang.String pToken)
          Return the token as a script-argument.
protected  java.lang.String quote(java.lang.String pString)
          Quote the given string.
protected  void writeHeader()
          Write the header of the script.
 
Methods inherited from class org.im4java.script.AbstractScriptGenerator
createScript, getOperation, getProperties, getSearchPath, getWriter, init, writeCommand, writeOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BashScriptGenerator

public BashScriptGenerator()
The default constructor.

Method Detail

writeHeader

protected void writeHeader()
Write the header of the script.

Overrides:
writeHeader in class AbstractScriptGenerator

getScriptArg

protected java.lang.String getScriptArg(java.lang.String pToken)
Return the token as a script-argument. Normally, the argument token is only part of the script-argument if it contains a [wxh+x+y]-read-spec.

Overrides:
getScriptArg in class AbstractScriptGenerator

quote

protected java.lang.String quote(java.lang.String pString)
Quote the given string.

Note that this implementation is not 100% correct, since it does not handle the case with pre-escaped strings correctly.

Overrides:
quote in class AbstractScriptGenerator

The im4java Library, Version 1.4.0

Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/