DefaultNative2Asciipublic abstract class DefaultNative2Ascii extends Object implements Native2AsciiAdapterencapsulates the handling common to diffent Native2Asciiadapter
implementations. |
Constructors Summary |
---|
public DefaultNative2Ascii()No-arg constructor.
|
Methods Summary |
---|
protected void | addFiles(org.apache.tools.ant.types.Commandline cmd, org.apache.tools.ant.ProjectComponent log, java.io.File src, java.io.File dest)Adds source and dest files to the command line.
This implementation adds them without any leading
qualifiers, source first.
cmd.createArgument().setFile(src);
cmd.createArgument().setFile(dest);
| public final boolean | convert(org.apache.tools.ant.taskdefs.optional.Native2Ascii args, java.io.File srcFile, java.io.File destFile)Splits the task into setting up the command line switches
Commandline cmd = new Commandline();
setup(cmd, args);
addFiles(cmd, args, srcFile, destFile);
return run(cmd, args);
| protected abstract boolean | run(org.apache.tools.ant.types.Commandline cmd, org.apache.tools.ant.ProjectComponent log)Executes the command.
| protected void | setup(org.apache.tools.ant.types.Commandline cmd, org.apache.tools.ant.taskdefs.optional.Native2Ascii args)Sets up the initial command line.
only the -encoding argument and nested arg elements get
handled here.
if (args.getEncoding() != null) {
cmd.createArgument().setValue("-encoding");
cmd.createArgument().setValue(args.getEncoding());
}
cmd.addArguments(args.getCurrentArgs());
|
|