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:
- Cloneable,- SelectorContainer
Converts files from native encodings to ASCII.
- Since:
- Ant 1.2
- 
Field SummaryFields inherited from class org.apache.tools.ant.taskdefs.MatchingTaskfilesetFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(Native2AsciiAdapter adapter) Set the adapter explicitly.voidadd(FileNameMapper fileNameMapper) A nested filenamemapperAdds an implementation specific command-line argument.The classpath to use when loading the native2ascii implementation if it is not a built-in one.Defines the FileNameMapper to use (nested mapper element).voidexecute()Execute the taskString[]Returns the (implementation specific) settings given as nested arg elements.The value of the encoding attribute.booleanThe value of the reverse attribute.voidSet the destination directory to place converted files into.voidsetEncoding(String encoding) Set the encoding to translate to/from.voidSet the extension which converted files should have.voidsetImplementation(String impl) Choose the implementation for this particular task.voidsetReverse(boolean reverse) Flag the conversion to run in the reverse sense, that is Ascii to Native encoding.voidSet the source directory in which to find files to convert.Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTaskadd, 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, XsetItemsMethods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation
- 
Constructor Details- 
Native2Asciipublic Native2Ascii()No args constructor
 
- 
- 
Method Details- 
setReversepublic 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;
 
- 
getReversepublic boolean getReverse()The value of the reverse attribute.- Returns:
- the reverse attribute.
- Since:
- Ant 1.6.3
 
- 
setEncodingSet 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.
 
- 
getEncodingThe value of the encoding attribute.- Returns:
- the encoding attribute.
- Since:
- Ant 1.6.3
 
- 
setSrcSet the source directory in which to find files to convert.- Parameters:
- srcDir- directory to find input file in.
 
- 
setDestSet the destination directory to place converted files into.- Parameters:
- destDir- directory to place output file into.
 
- 
setExtSet the extension which converted files should have. If unset, files will not be renamed.- Parameters:
- ext- File extension to use for converted files.
 
- 
setImplementationChoose the implementation for this particular task.- Parameters:
- impl- the name of the implementation
- Since:
- Ant 1.6.3
 
- 
createMapperDefines 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.
 
- 
addA nested filenamemapper- Parameters:
- fileNameMapper- the mapper to add
- Since:
- Ant 1.6.3
 
- 
createArgAdds an implementation specific command-line argument.- Returns:
- a ImplementationSpecificArgument to be configured
- Since:
- Ant 1.6.3
 
- 
createImplementationClasspathThe classpath to use when loading the native2ascii implementation if it is not a built-in one.- Returns:
- Path
- Since:
- Ant 1.8.0
 
- 
addSet the adapter explicitly.- Parameters:
- adapter- Native2AsciiAdapter
- Since:
- Ant 1.8.0
 
- 
executeExecute the task- Overrides:
- executein class- Task
- Throws:
- BuildException- is there is a problem in the task execution.
 
- 
getCurrentArgsReturns the (implementation specific) settings given as nested arg elements.- Returns:
- the arguments.
- Since:
- Ant 1.6.3
 
 
-