org.silverpeas.util
Class Charsets

java.lang.Object
  extended by org.silverpeas.util.Charsets

public class Charsets
extends Object

Author:
ehugonnet

Field Summary
static Charset ISO_8859_1
          ISO-8859-1 : ISO-LATIN-1.
static Charset US_ASCII
          US-ASCII: seven-bit ASCII.
static Charset UTF_16
          UTF-16: UTF-16 byte order identified by an optional byte-order mark.
static Charset UTF_16BE
          UTF-16BE: UTF-16 big-endian byte order.
static Charset UTF_16LE
          UTF-16LE: UTF-16 little-endian byte order.
static Charset UTF_8
          UTF-8.
 
Method Summary
static Charset toCharset(String charset)
          Returns a Charset for the named charset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

US_ASCII

public static final Charset US_ASCII
US-ASCII: seven-bit ASCII.


ISO_8859_1

public static final Charset ISO_8859_1
ISO-8859-1 : ISO-LATIN-1.


UTF_8

public static final Charset UTF_8
UTF-8.


UTF_16BE

public static final Charset UTF_16BE
UTF-16BE: UTF-16 big-endian byte order.


UTF_16LE

public static final Charset UTF_16LE
UTF-16LE: UTF-16 little-endian byte order.


UTF_16

public static final Charset UTF_16
UTF-16: UTF-16 byte order identified by an optional byte-order mark.

Method Detail

toCharset

public static Charset toCharset(String charset)
                         throws UnsupportedCharsetException
Returns a Charset for the named charset. If the name is null, return the default Charset.

Parameters:
charset - The name of the requested charset, may be null.
Returns:
a Charset for the named charset
Throws:
UnsupportedCharsetException - If the named charset is unavailable


Copyright © 2016 Silverpeas. All Rights Reserved.