API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.nio.charset. Charset View Source
Author(s)
Mark Reinhold
JSR-51 Expert Group
Since
1.4
Version
1.53, 06/06/28
Serial
Hierarchy
 Object
      Charset
Implements
 Comparable
Subclasses
Description
publicabstract abstract class Charset
  A named mapping between sequences of sixteen-bit Unicode code units and sequences of bytes.
See also:    CharsetDecoder CharsetEncoder CharsetProvider Character
Constructors
protected Charset (String canonicalName, String aliases)
  Initializes a new charset with the given canonical name and alias set.
Methods
Hide/Show inherited methods
publicfinal Set<String> aliases ()
  Returns a set containing this charset's aliases.
pack-privatestatic boolean atBugLevel (String bl)
publicstatic SortedMap<String, Charset> availableCharsets ()
  Constructs a sorted map from canonical charset names to charset objects.
public boolean canEncode ()
  Tells whether or not this charset supports encoding.
publicfinal int compareTo (Charset that)
  Compares this charset to another.
publicabstract boolean contains (Charset cs)
  Tells whether or not this charset contains the given charset.
publicfinal CharBuffer decode (ByteBuffer bb)
  Convenience method that decodes bytes in this charset into Unicode characters.
publicstatic Charset defaultCharset ()
  Returns the default charset of this Java virtual machine.
public String displayName ()
  Returns this charset's human-readable name for the default locale.
public String displayName (Locale locale)
  Returns this charset's human-readable name for the given locale.
publicfinal ByteBuffer encode (CharBuffer cb)
  Convenience method that encodes Unicode characters into bytes in this charset.
publicfinal ByteBuffer encode (String str)
  Convenience method that encodes a string into bytes in this charset.
publicfinal boolean equals (Object ob)
  Tells whether or not this object is equal to another.
publicstatic Charset forName (String charsetName)
  Returns a charset object for the named charset.
publicfinal int hashCode ()
  Computes a hashcode for this charset.
publicfinal boolean isRegistered ()
  Tells whether or not this charset is registered in the IANA Charset Registry.
publicstatic boolean isSupported (String charsetName)
  Tells whether the named charset is supported.
publicfinal String name ()
  Returns this charset's canonical name.
publicabstract CharsetDecoder newDecoder ()
  Constructs a new decoder for this charset.
publicabstract CharsetEncoder newEncoder ()
  Constructs a new encoder for this charset.
publicfinal String toString ()
  Returns a string describing this charset.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar