|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.nio.charset.Charset
public abstract class Charset
| Constructor Summary | |
|---|---|
protected |
Charset(String canonicalName,
String[] aliases)
|
| Method Summary | |
|---|---|
Set |
aliases()
|
static SortedMap |
availableCharsets()
|
boolean |
canEncode()
|
int |
compareTo(Object ob)
compareTo compares this to another object. |
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)
equals compares this object to another object. |
static Charset |
forName(String charsetName)
Returns the Charset instance for the charset of the given name. |
int |
hashCode()
hashCode returns a hash code for this object. |
boolean |
isRegistered()
|
static boolean |
isSupported(String charsetName)
|
String |
name()
|
abstract CharsetDecoder |
newDecoder()
|
abstract CharsetEncoder |
newEncoder()
|
String |
toString()
toString creates a printable string that represents this object for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Charset(String canonicalName,
String[] aliases)
| Method Detail |
|---|
public static Charset defaultCharset()
public static boolean isSupported(String charsetName)
public static Charset forName(String charsetName)
charsetName -
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.public static SortedMap availableCharsets()
public final String name()
public final Set aliases()
public String displayName()
public String displayName(Locale locale)
public final boolean isRegistered()
public abstract boolean contains(Charset cs)
public abstract CharsetDecoder newDecoder()
public abstract CharsetEncoder newEncoder()
public boolean canEncode()
public final ByteBuffer encode(CharBuffer cb)
public final ByteBuffer encode(String str)
public final CharBuffer decode(ByteBuffer bb)
public final int compareTo(Object ob)
Comparablefor any a, b and c that are comparable instance of the same class, the following must hold:
a.compareTo(b) < 0 ==> b.compareTo(a) > 0 a.compareTo(b) > 0 ==> b.compareTo(a) < 0 a.compareTo(b) == 0 ==> b.compareTo(a) == 0
a.compareTo(b) == 0 && a.compareTo(c) < 0 ==> b.compareTo(c) < 0 a.compareTo(b) == 0 && a.compareTo(c) > 0 ==> b.compareTo(c) > 0 a.compareTo(b) == 0 && a.compareTo(c) == 0 ==> b.compareTo(c) == 0
a.compareTo(b) < 0 && b.compareTo(c) < 0 ==> a.compareTo(c) < 0 a.compareTo(b) > 0 && b.compareTo(c) > 0 ==> a.compareTo(c) > 0
compareTo in interface Comparableob - the other object
public final int hashCode()
ObjectThe default implementation returns System.identityHashCode(this).
hashCode in class Objectpublic final boolean equals(Object ob)
ObjectEquals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.
If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.
The default implementation of equals returns this==other.
equals in class Objectob - the other object.
public final String toString()
ObjectThe default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||