com.flagstone.transform
Enum CharacterEncoding

java.lang.Object
  extended by java.lang.Enum<CharacterEncoding>
      extended by com.flagstone.transform.CharacterEncoding
All Implemented Interfaces:
Serializable, Comparable<CharacterEncoding>

public enum CharacterEncoding
extends Enum<CharacterEncoding>

CharacterEncoding is used to identify the encoding used for characters in strings stored in the movie.


Enum Constant Summary
ANSI
          Defines that the characters in a font or string are encoded using the ANSI (ASCII) standard.
CP932
          Defines that the characters in a font or string are encoded using Microsoft's extensions (Code Page 932) to the SJIS standard for representing Kanji characters.
MS932
          MS932 is an alias for Microsoft's extension to Shift-JIS.
SJIS
          Defines that the characters in a font or string are encoded using SJIS standard for representing Kanji characters.
UTF8
          Defines that the characters in a font or string are encoded using Unicode (UTF-8).
WINDOWS31J
          Microsoft's extension to Shift-JIS.
 
Method Summary
static CharacterEncoding fromCharSet(Charset set)
          Get the ChanrcterEncoding that is identified by the canonical name of a CharSet object.
 String getEncoding()
          Get the string used by Java to identify the character encoding.
static CharacterEncoding valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CharacterEncoding[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SJIS

public static final CharacterEncoding SJIS
Defines that the characters in a font or string are encoded using SJIS standard for representing Kanji characters.


ANSI

public static final CharacterEncoding ANSI
Defines that the characters in a font or string are encoded using the ANSI (ASCII) standard.


UTF8

public static final CharacterEncoding UTF8
Defines that the characters in a font or string are encoded using Unicode (UTF-8).


WINDOWS31J

public static final CharacterEncoding WINDOWS31J
Microsoft's extension to Shift-JIS. MS932, windows-932, and csWindows31J are all known aliases of this character set.


MS932

public static final CharacterEncoding MS932
MS932 is an alias for Microsoft's extension to Shift-JIS. It is not clear whether the same set of extensions is used in CP932.


CP932

public static final CharacterEncoding CP932
Defines that the characters in a font or string are encoded using Microsoft's extensions (Code Page 932) to the SJIS standard for representing Kanji characters.

Method Detail

values

public static CharacterEncoding[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CharacterEncoding c : CharacterEncoding.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CharacterEncoding valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromCharSet

public static CharacterEncoding fromCharSet(Charset set)
Get the ChanrcterEncoding that is identified by the canonical name of a CharSet object.

Parameters:
set - the CharSet.
Returns:
the CharacterEncoding that matches the canonical name of the CharSet.

getEncoding

public String getEncoding()
Get the string used by Java to identify the character encoding.

Returns:
the name commonly used to represent the character encoding.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.