Google

Native2Ascii (Apache Ant API)

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:
SelectorContainer

public class Native2Ascii
extends MatchingTask

Converts files from native encodings to ASCII.

Since:
Ant 1.2
Author:
Drew Sudell
, Stefan Bodewig

Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
Native2Ascii()
           
 
Method Summary
 Mapper createMapper()
          Defines the FileNameMapper to use (nested mapper element).
 void execute()
          Called by the project to let the task do its work.
 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 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
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Native2Ascii


public Native2Ascii()
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;

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.

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.

createMapper


public Mapper createMapper()
                    throws BuildException
Defines the FileNameMapper to use (nested mapper element).

BuildException

execute


public void execute()
             throws BuildException
Description copied from class: Task
Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.

Overrides:
execute in class Task
Throws:
BuildException - if something goes wrong with the build


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.