java.nio.charset
public abstract class Charset extends Object implements Comparable<Charset>
Since: 1.4
UNKNOWN: updated to 1.5
| Constructor Summary | |
|---|---|
| protected | Charset(String canonicalName, String[] aliases) |
| Method Summary | |
|---|---|
| Set<String> | aliases() |
| static SortedMap<String,Charset> | availableCharsets() |
| boolean | canEncode() |
| int | compareTo(Charset other) |
| abstract boolean | contains(Charset cs) |
| CharBuffer | decode(ByteBuffer bb) |
| static Charset | defaultCharset()
Returns the system default charset.
|
| String | displayName() |
| String | displayName(Locale locale) |
| ByteBuffer | encode(CharBuffer cb) |
| ByteBuffer | encode(String str) |
| boolean | equals(Object ob) |
| static Charset | forName(String charsetName)
Returns the Charset instance for the charset of the given name.
|
| int | hashCode() |
| boolean | isRegistered() |
| static boolean | isSupported(String charsetName) |
| String | name() |
| abstract CharsetDecoder | newDecoder() |
| abstract CharsetEncoder | newEncoder() |
| String | toString() |
Since: 1.5
Parameters: charsetName
Returns: the Charset instance for the indicated charset
Throws: UnsupportedCharsetException if this VM does not support
the charset of the given name. IllegalCharsetNameException if the given charset name is
legal. IllegalArgumentException if charsetName is null.