net.sf.mpxj
Enum CodePage

java.lang.Object
  extended by java.lang.Enum<CodePage>
      extended by net.sf.mpxj.CodePage
All Implemented Interfaces:
Serializable, Comparable<CodePage>

public enum CodePage
extends Enum<CodePage>

Instances of this class represent enumerated code page values.


Enum Constant Summary
ANSI
           
LATIN
           
MAC
           
US
           
ZH
           
 
Method Summary
 Charset getCharset()
          Retrieve the Java character set represented by the codepage.
static CodePage getInstance(String value)
          Retrieve a CodePage instance representing the supplied value.
 String toString()
          Returns the string representation of the codepage.
static CodePage valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CodePage[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANSI

public static final CodePage ANSI

MAC

public static final CodePage MAC

LATIN

public static final CodePage LATIN

US

public static final CodePage US

ZH

public static final CodePage ZH
Method Detail

values

public static CodePage[] 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 (CodePage c : CodePage.values())
    System.out.println(c);

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

valueOf

public static CodePage 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

getInstance

public static CodePage getInstance(String value)
Retrieve a CodePage instance representing the supplied value.

Parameters:
value - MPX code page name
Returns:
CodePage instance

getCharset

public Charset getCharset()
Retrieve the Java character set represented by the codepage.

Returns:
Java Charset instance

toString

public String toString()
Returns the string representation of the codepage.

Overrides:
toString in class Enum<CodePage>
Returns:
codepage


Copyright © 2012. All Rights Reserved.