Yet Another WebIOPi+
 All Classes Namespaces Files Functions Variables Macros Pages
Static Public Member Functions | Static Public Attributes | List of all members
org.apache.commons.codec.Charsets Class Reference

Static Public Member Functions

static Charset toCharset (final Charset charset)
 
static Charset toCharset (final String charset)
 

Static Public Attributes

static final Charset ISO_8859_1 = Charset.forName(CharEncoding.ISO_8859_1)
 
static final Charset US_ASCII = Charset.forName(CharEncoding.US_ASCII)
 
static final Charset UTF_16 = Charset.forName(CharEncoding.UTF_16)
 
static final Charset UTF_16BE = Charset.forName(CharEncoding.UTF_16BE)
 
static final Charset UTF_16LE = Charset.forName(CharEncoding.UTF_16LE)
 
static final Charset UTF_8 = Charset.forName(CharEncoding.UTF_8)
 

Detailed Description

Charsets required of every implementation of the Java platform.

From the Java documentation Standard charsets:

<cite>Every implementation of the Java platform is required to support the following character encodings. Consult the release documentation for your implementation to see if any other encodings are supported. Consult the release documentation for your implementation to see if any other encodings are supported. </cite>

This perhaps would best belong in the Commons Lang project. Even if a similar class is defined in Commons Lang, it is not foreseen that Commons Codec would be made to depend on Commons Lang.

This class is immutable and thread-safe.

See also
Standard charsets
Since
1.7
Version
Id
CharEncoding.java 1173287 2011-09-20 18:16:19Z ggregory

Definition at line 59 of file Charsets.java.

Member Function Documentation

static Charset org.apache.commons.codec.Charsets.toCharset ( final Charset  charset)
static

Returns the given Charset or the default Charset if the given Charset is null.

Parameters
charsetA charset or null.
Returns
the given Charset or the default Charset if the given Charset is null

Definition at line 73 of file Charsets.java.

static Charset org.apache.commons.codec.Charsets.toCharset ( final String  charset)
static

Returns a Charset for the named charset. If the name is null, return the default Charset.

Parameters
charsetThe name of the requested charset, may be null.
Returns
a Charset for the named charset
Exceptions
java.nio.charset.UnsupportedCharsetExceptionIf the named charset is unavailable

Definition at line 86 of file Charsets.java.

Member Data Documentation

final Charset org.apache.commons.codec.Charsets.ISO_8859_1 = Charset.forName(CharEncoding.ISO_8859_1)
static

CharEncodingISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1.

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 97 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesIso8859_1(), and org.apache.commons.codec.binary.StringUtils.newStringIso8859_1().

final Charset org.apache.commons.codec.Charsets.US_ASCII = Charset.forName(CharEncoding.US_ASCII)
static

Seven-bit ASCII, also known as ISO646-US, also known as the Basic Latin block of the Unicode character set.

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 106 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesUsAscii(), and org.apache.commons.codec.binary.StringUtils.newStringUsAscii().

final Charset org.apache.commons.codec.Charsets.UTF_16 = Charset.forName(CharEncoding.UTF_16)
static

Sixteen-bit Unicode Transformation Format, The byte order specified by a mandatory initial byte-order mark (either order accepted on input, big-endian used on output)

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 116 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesUtf16(), and org.apache.commons.codec.binary.StringUtils.newStringUtf16().

final Charset org.apache.commons.codec.Charsets.UTF_16BE = Charset.forName(CharEncoding.UTF_16BE)
static

Sixteen-bit Unicode Transformation Format, big-endian byte order.

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 125 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesUtf16Be(), and org.apache.commons.codec.binary.StringUtils.newStringUtf16Be().

final Charset org.apache.commons.codec.Charsets.UTF_16LE = Charset.forName(CharEncoding.UTF_16LE)
static

Sixteen-bit Unicode Transformation Format, little-endian byte order.

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 134 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesUtf16Le(), and org.apache.commons.codec.binary.StringUtils.newStringUtf16Le().

final Charset org.apache.commons.codec.Charsets.UTF_8 = Charset.forName(CharEncoding.UTF_8)
static

Eight-bit Unicode Transformation Format.

Every implementation of the Java platform is required to support this character encoding.

See also
Standard charsets

Definition at line 143 of file Charsets.java.

Referenced by org.apache.commons.codec.binary.StringUtils.getBytesUtf8(), and org.apache.commons.codec.binary.StringUtils.newStringUtf8().


The documentation for this class was generated from the following file: