SunNative2Ascii (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.native2ascii, class: SunNative2Ascii

# Class SunNative2Ascii

java.lang.Object
org.apache.tools.ant.taskdefs.optional.native2ascii.DefaultNative2Ascii
org.apache.tools.ant.taskdefs.optional.native2ascii.SunNative2Ascii

All Implemented Interfaces:
  `Native2AsciiAdapter`

public final class SunNative2Ascii extends DefaultNative2Ascii
Adapter to sun.tools.native2ascii.Main.

Since:
  Ant 1.6.3

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `IMPLEMENTATION_NAME`
  Identifies this adapter.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SunNative2Ascii()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected 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 DefaultNative2Ascii

  `addFiles, convert`
  Modifier and Type
  Method
  Description
  `protected void`
  `addFiles(Commandline cmd, ProjectComponent log, File src, File dest)`
  Adds source and dest files to the command line.
  `final boolean`
  `convert(Native2Ascii args, File srcFile, File destFile)`
  Splits the task into setting up the command line switches

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### IMPLEMENTATION_NAME

    public static final String IMPLEMENTATION_NAME
    Identifies this adapter.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SunNative2Ascii

    public SunNative2Ascii()

- ## Method Details

  - ### 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.

    Overrides:
      `setup` in class `DefaultNative2Ascii`
    Parameters:
      `cmd` - Command line to add to
      `args` - provides the user-setting and access to Ant's logging system.
    Throws:
      `BuildException` - if there was a problem.

  - ### run

    protected boolean run(Commandline cmd, ProjectComponent log) throws BuildException
    Executes the command.
    Specified by:
      `run` in class `DefaultNative2Ascii`
    Parameters:
      `cmd` - Command line to execute
      `log` - provides access to Ant's logging system.
    Returns:
      whether execution was successful
    Throws:
      `BuildException` - if there was a problem.