public abstract class CharEncoding extends Object
Modifier and Type | Method and Description |
---|---|
static CharEncoding |
create(String enc)
Create a new CharacterEncoding object,
given a name of a character encoding
identifying it.
|
abstract boolean |
isIANA()
Returns true if this charset
registered at IANA.
|
abstract boolean |
isInNIO()
Returns true if this charset is supported by
java.nio.charset.Charset.
|
String |
name()
Gives the canonical name for this charset.
|
abstract String |
warningMessage()
|
public String name()
isIANA()
returns true, then
this is the name registered at IANA.
If isInNIO()
returns true, and
isIANA()
returns false, then this name
will start with "x-".
The name is case insensitive, but not case
normalized.public abstract boolean isIANA()
isInNIO()
returns false, no information
is known, and this method returns false.public abstract boolean isInNIO()
isIANA()
does not work correctly.public abstract String warningMessage()
isIANA()
or isInNIO()
return false, this returns a suggested warning
message. If isIANA()
is true, then this
returns null.public static CharEncoding create(String enc)
enc
- A name.Licenced under the Apache License, Version 2.0