|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.taskdefs.optional.native2ascii.DefaultNative2Ascii
public abstract class DefaultNative2Ascii
encapsulates the handling common to diffent Native2Asciiadapter implementations.
Constructor Summary | |
---|---|
DefaultNative2Ascii()
No-arg constructor. |
Method Summary | |
---|---|
protected void |
addFiles(Commandline cmd,
ProjectComponent log,
java.io.File src,
java.io.File dest)
Adds source and dest files to the command line. |
boolean |
convert(Native2Ascii args,
java.io.File srcFile,
java.io.File destFile)
Splits the task into setting up the command line switches |
protected abstract boolean |
run(Commandline cmd,
ProjectComponent log)
Executes the command. |
protected void |
setup(Commandline cmd,
Native2Ascii args)
Sets up the initial command line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNative2Ascii()
Method Detail |
---|
public final boolean convert(Native2Ascii args, java.io.File srcFile, java.io.File destFile) throws BuildException
convert
in interface Native2AsciiAdapter
args
- the native 2 ascii arguments.srcFile
- the source file.destFile
- the destination file.
BuildException
- if there is a problem.
(delegated to setup
), adding the file names
(delegated to addFiles
) and running the tool
(delegated to run
).protected void setup(Commandline cmd, Native2Ascii args) throws BuildException
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.
BuildException
- if there was a problem.protected void addFiles(Commandline cmd, ProjectComponent log, java.io.File src, java.io.File dest) throws BuildException
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
BuildException
- if there was a problem.protected abstract boolean run(Commandline cmd, ProjectComponent log) throws BuildException
cmd
- Command line to executelog
- provides access to Ant's logging system.
BuildException
- if there was a problem.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |