java.nio.charset.Charset
A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes. This class defines methods for creating decoders and encoders and for retrieving the various names associated with a charset. Instances of this class are immutable.
Some methods of Charset class
aliases(): It returns a set containing this charset's aliases.
Charset.availableCharsets(): It constructs a sorted map from canonical charset names to charset objects. The map returned by this method will have one entry for each charset for which support is available in the current Java virtual machine.
canEncode(): It tells whether or not this charset supports encoding. Nearly all charsets support encoding.
compareTo(): It compares this charset to another.
contains(): It tells whether or not this charset contains the given charset.
decode(): This method is a convenient method that decodes bytes in this charset into Unicode characters.
Charset.defaultCharset(): It returns the default charset of this Java virtual machine.
displayName(): It returns this charset's human-readable name for the default locale.
displayName(Locale locale): It returns this charset's human-readable name for the given locale.
encode(CharBuffer cb): This method is a convenient method that encodes Unicode characters into bytes in this charset.
encode(String str): This method is a Convenience method that encodes a string into bytes in this charset.
equals(): It tells whether or not this object is equal to another.
Charset.forName(): It returns a charset object for the named charset.
hashCode(): It computes a hashcode for this charset.
isRegistered(): It tells whether or not this charset is registered in the IANA Charset Registry.
Charset.isSupported(): It tells whether the named charset is supported.
name(): It returns this charset's canonical name.
newDecoder(): It constructs a new decoder for this charset.
newEncoder(): It constructs a new encoder for this charset.
toString(): It returns a string describing this charset.
No comments:
Post a Comment