Native2Ascii (Apache Ant API)

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tools.ant.taskdefs.optional
Class Native2Ascii

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.MatchingTask
                  org.apache.tools.ant.taskdefs.optional.Native2Ascii

All Implemented Interfaces:
  java.lang.Cloneable, SelectorContainer

    public class Native2Ascii

extends MatchingTask

Converts files from native encodings to ASCII.

Since:
  Ant 1.2

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`fileset`

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`Native2Ascii()` No args constructor

Method Summary
`void` | `add(FileNameMapper fileNameMapper)` A nested filenamemapper
`void` | `add(Native2AsciiAdapter adapter)` Set the adapter explicitly.
`ImplementationSpecificArgument` | `createArg()` Adds an implementation specific command-line argument.
`Path` | `createImplementationClasspath()` The classpath to use when loading the native2ascii implementation if it is not a built-in one.
`Mapper` | `createMapper()` Defines the FileNameMapper to use (nested mapper element).
`void` | `execute()` Execute the task
`java.lang.String[]` | `getCurrentArgs()` Returns the (implementation specific) settings given as nested arg elements.
`java.lang.String` | `getEncoding()` The value of the encoding attribute.
`boolean` | `getReverse()` The value of the reverse attribute.
`void` | `setDest(java.io.File destDir)` Set the destination directory to place converted files into.
`void` | `setEncoding(java.lang.String encoding)` Set the encoding to translate to/from.
`void` | `setExt(java.lang.String ext)` Set the extension which converted files should have.
`void` | `setImplementation(java.lang.String impl)` Choose the implementation for this particular task.
`void` | `setReverse(boolean reverse)` Flag the conversion to run in the reverse sense, that is Ascii to Native encoding.
`void` | `setSrc(java.io.File srcDir)` Set the source directory in which to find files to convert.

Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems`

Methods inherited from class org.apache.tools.ant.Task
`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Native2Ascii

    public Native2Ascii()

  No args constructor

Method Detail

### setReverse

    public void setReverse(boolean reverse)

  Flag the conversion to run in the reverse sense, that is Ascii to Native encoding.

  Parameters:
    `reverse` - True if the conversion is to be reversed, otherwise false;

### getReverse

    public boolean getReverse()

  The value of the reverse attribute.

  Returns:
    the reverse attribute.
  Since:
    Ant 1.6.3

### setEncoding

    public void setEncoding(java.lang.String encoding)

  Set the encoding to translate to/from. If unset, the default encoding for the JVM is used.

  Parameters:
    `encoding` - String containing the name of the Native encoding to convert from or to.

### getEncoding

    public java.lang.String getEncoding()

  The value of the encoding attribute.

  Returns:
    the encoding attribute.
  Since:
    Ant 1.6.3

### setSrc

    public void setSrc(java.io.File srcDir)

  Set the source directory in which to find files to convert.

  Parameters:
    `srcDir` - directory to find input file in.

### setDest

    public void setDest(java.io.File destDir)

  Set the destination directory to place converted files into.

  Parameters:
    `destDir` - directory to place output file into.

### setExt

    public void setExt(java.lang.String ext)

  Set the extension which converted files should have. If unset, files will not be renamed.

  Parameters:
    `ext` - File extension to use for converted files.

### setImplementation

    public void setImplementation(java.lang.String impl)

  Choose the implementation for this particular task.

  Parameters:
    `impl` - the name of the implemenation
  Since:
    Ant 1.6.3

### createMapper

    public Mapper createMapper()
                        throws BuildException

  Defines the FileNameMapper to use (nested mapper element).

  Returns:
    the mapper to use for file name translations.
  Throws:
    `BuildException` - if more than one mapper is defined.

### add

    public void add(FileNameMapper fileNameMapper)

  A nested filenamemapper

  Parameters:
    `fileNameMapper` - the mapper to add
  Since:
    Ant 1.6.3

### createArg

    public ImplementationSpecificArgument createArg()

  Adds an implementation specific command-line argument.

  Returns:
    a ImplementationSpecificArgument to be configured
  Since:
    Ant 1.6.3

### createImplementationClasspath

    public Path createImplementationClasspath()

  The classpath to use when loading the native2ascii implementation if it is not a built-in one.

  Since:
    Ant 1.8.0

### add

    public void add(Native2AsciiAdapter adapter)

  Set the adapter explicitly.

  Since:
    Ant 1.8.0

### execute

    public void execute()
                 throws BuildException

  Execute the task

  Overrides:
    `execute` in class `Task`
  Throws:
    `BuildException` - is there is a problem in the task execution.

### getCurrentArgs

    public java.lang.String[] getCurrentArgs()

  Returns the (implementation specific) settings given as nested arg elements.

  Returns:
    the arguments.
  Since:
    Ant 1.6.3

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD