Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.native2ascii

public Class BuiltinNative2Ascii

extends Object
implements Native2AsciiAdapter
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter
Imports
java.io.BufferedReader, .BufferedWriter, .File, .FileReader, .FileWriter, .IOException, .InputStreamReader, .OutputStreamWriter, .Writer, java.nio.file.Files, java.util.function.UnaryOperator, org.apache.tools.ant.BuildException, org.apache.tools.ant.taskdefs.optional.Native2Ascii, org.apache.tools.ant.util.Native2AsciiUtils

Encapsulates the built-in Native2Ascii implementation.
Since
Ant 1.9.8

Field Summary

Modifier and TypeField and Description
pack-priv static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
convert(Native2Ascii
Task that holds command line arguments and allows the implementation to send messages to Ant's logging system
args
,
File
the source to convert
srcFile
,
File
where to send output to
destFile
)

Implements org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter.convert.

Convert the encoding of srcFile writing to destFile.
private BufferedReader
getReader(File srcFile, String encoding, boolean reverse)

private Writer
getWriter(File destFile, String encoding, boolean reverse)

private void
translate(BufferedReader input, Writer output, UnaryOperator<String> translation)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

IMPLEMENTATION_NAMEback to summary
pack-priv static final String IMPLEMENTATION_NAME

Constructor Detail

BuiltinNative2Asciiback to summary
public BuiltinNative2Ascii()

Method Detail

convertback to summary
public final boolean convert(Native2Ascii args, File srcFile, File destFile) throws BuildException

Implements org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter.convert.

Doc from org.apache.tools.ant.taskdefs.optional.native2ascii.Native2AsciiAdapter.convert.

Convert the encoding of srcFile writing to destFile.

Parameters
args:Native2Ascii

Task that holds command line arguments and allows the implementation to send messages to Ant's logging system

srcFile:File

the source to convert

destFile:File

where to send output to

Returns:boolean

whether the conversion has been successful.

Annotations
@Override
Exceptions
BuildException:
if there was a problem.
getReaderback to summary
private BufferedReader getReader(File srcFile, String encoding, boolean reverse) throws IOException
getWriterback to summary
private Writer getWriter(File destFile, String encoding, boolean reverse) throws IOException
translateback to summary
private void translate(BufferedReader input, Writer output, UnaryOperator<String> translation) throws IOException