org.apache.tools.ant.taskdefs.optional.native2ascii
Class DefaultNative2Ascii
java.lang.Object
org.apache.tools.ant.taskdefs.optional.native2ascii.DefaultNative2Ascii
- Native2AsciiAdapter
public abstract class DefaultNative2Ascii
extends java.lang.Object
encapsulates the handling common to diffent Native2Asciiadapter
implementations.
DefaultNative2Ascii
public DefaultNative2Ascii()
No-arg constructor.
addFiles
protected void addFiles(Commandline cmd,
ProjectComponent log,
File src,
File dest)
throws BuildException
Adds source and dest files to the command line.
This implementation adds them without any leading
qualifiers, source first.
cmd
- Command line to add tolog
- provides access to Ant's logging system.src
- the source filedest
- the destination file
convert
public final boolean convert(Native2Ascii args,
File srcFile,
File destFile)
throws BuildException
Splits the task into setting up the command line switches
- convert in interface Native2AsciiAdapter
args
- the native 2 ascii arguments.srcFile
- the source file.destFile
- the destination file.
- run if the conversion was successful.
run
protected abstract boolean run(Commandline cmd,
ProjectComponent log)
throws BuildException
Executes the command.
cmd
- Command line to executelog
- provides access to Ant's logging system.
- whether execution was successful
setup
protected void setup(Commandline cmd,
Native2Ascii args)
throws BuildException
Sets up the initial command line.
only the -encoding argument and nested arg elements get
handled here.
cmd
- Command line to add toargs
- provides the user-setting and access to Ant's
logging system.