Package org.apache.tools.ant.types
Class CharSet
- java.lang.Object
- 
- org.apache.tools.ant.types.EnumeratedAttribute
- 
- org.apache.tools.ant.types.CharSet
 
 
- 
 public class CharSet extends EnumeratedAttribute EnumeratedAttribute implementation for Charset to use with encoding/charset attributes.- Since:
- Ant 1.10.6
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.types.EnumeratedAttributevalue
 
- 
 - 
Method SummaryModifier and Type Method Description booleanequivalent(CharSet cs)Tell if CharSet values are aliases.static CharSetgetAscii()Convenience methood: get US-ASCII CharSet.java.nio.charset.CharsetgetCharset()Convert this enumerated type to aCharset.static CharSetgetDefault()Get the default value as provided by Charset.static CharSetgetUtf8()Convenience method: get UTF-8 CharSet.java.lang.String[]getValues()Return the possible values.voidsetValue(java.lang.String value)Accept additional values for backwards compatibility (some java.io encoding names not available in java.nio)- 
Methods inherited from class org.apache.tools.ant.types.EnumeratedAttributecontainsValue, getIndex, getInstance, getValue, indexOfValue, toString
 
- 
 
- 
- 
- 
Method Detail- 
getDefaultpublic static CharSet getDefault() Get the default value as provided by Charset.- Returns:
- the default value.
 
 - 
getAsciipublic static CharSet getAscii() Convenience methood: get US-ASCII CharSet.- Returns:
- the default value.
 
 - 
getUtf8public static CharSet getUtf8() Convenience method: get UTF-8 CharSet.- Returns:
- the default value.
 
 - 
equivalentpublic boolean equivalent(CharSet cs) Tell if CharSet values are aliases.- Parameters:
- cs- CharSet to compare the value to.
- Returns:
- true if CharSet values are aliases.
 
 - 
getCharsetpublic java.nio.charset.Charset getCharset() Convert this enumerated type to aCharset.- Returns:
- a Charsetobject.
 
 - 
getValuespublic java.lang.String[] getValues() Return the possible values.- Specified by:
- getValuesin class- EnumeratedAttribute
- Returns:
- String[] of Charset names.
 
 - 
setValuepublic final void setValue(java.lang.String value) Accept additional values for backwards compatibility (some java.io encoding names not available in java.nio)- Overrides:
- setValuein class- EnumeratedAttribute
- Parameters:
- value- the- Stringvalue of the attribute
 
 
- 
 
-