Top Description Fields Constructors Methods
org.apache.tools.ant.types

public Class CharSet

extends EnumeratedAttribute
Class Inheritance
Imports
java.nio.charset.Charset, .StandardCharsets, java.util.ArrayList, .Arrays, .List, .Map

EnumeratedAttribute implementation for Charset to use with encoding/charset attributes.
Since
Ant 1.10.6

Field Summary

Modifier and TypeField and Description
private static final List<String>
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public
CharSet()

Default constructor.

public
CharSet(String
the EnumeratedAttribute value.
value
)

Construct a new CharSet with the specified value.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if CharSet values are aliases.
equivalent
(CharSet
CharSet to compare the value to.
cs
)

Tell if CharSet values are aliases.

public static CharSet

Returns:

the default value.
getAscii
()

Convenience methood: get US-ASCII CharSet.

public Charset

Returns:

a Charset object.
getCharset
()

Convert this enumerated type to a Charset.

public static CharSet

Returns:

the default value.
getDefault
()

Get the default value as provided by Charset.

public static CharSet

Returns:

the default value.
getUtf8
()

Convenience method: get UTF-8 CharSet.

public String[]

Returns:

String[] of Charset names.
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Return the possible values.
public final void
setValue(final String
the String value of the attribute
value
)

Overrides org.apache.tools.ant.types.EnumeratedAttribute.setValue.

Accept additional values for backwards compatibility (some java.io encoding names not available in java.nio)
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuetoString

Field Detail

VALUESback to summary
private static final List<String> VALUES

Constructor Detail

CharSetback to summary
public CharSet()

Default constructor.

CharSetback to summary
public CharSet(String value)

Construct a new CharSet with the specified value.

Parameters
value:String

the EnumeratedAttribute value.

Method Detail

equivalentback to summary
public boolean equivalent(CharSet cs)

Tell if CharSet values are aliases.

Parameters
cs:CharSet

CharSet to compare the value to.

Returns:boolean

true if CharSet values are aliases.

getAsciiback to summary
public static CharSet getAscii()

Convenience methood: get US-ASCII CharSet.

Returns:CharSet

the default value.

getCharsetback to summary
public Charset getCharset()

Convert this enumerated type to a Charset.

Returns:Charset

a Charset object.

getDefaultback to summary
public static CharSet getDefault()

Get the default value as provided by Charset.

Returns:CharSet

the default value.

getUtf8back to summary
public static CharSet getUtf8()

Convenience method: get UTF-8 CharSet.

Returns:CharSet

the default value.

getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Return the possible values.

Returns:String[]

String[] of Charset names.

Annotations
@Override
setValueback to summary
public final void setValue(final String value)

Overrides org.apache.tools.ant.types.EnumeratedAttribute.setValue.

Accept additional values for backwards compatibility (some java.io encoding names not available in java.nio)

Parameters
value:String

the String value of the attribute

Annotations
@Override