org.pentaho.reporting.libraries.fonts.encoding

Class EncodingRegistry

public final class EncodingRegistry extends Object

A global registry for all supported encodings. This offers the option to fall back to Java - which is enabled by default.

Author: Thomas Morgner.

Field Summary
static StringENCODING_ALIAS_PREFIX
Method Summary
EncodinggetEncoding(String name)
static EncodingRegistrygetInstance()
static StringgetPlatformDefaultEncoding()
Helper method to read the platform default encoding from the VM's system properties.
booleanisSupportedEncoding(String encoding)
Returns true if the encoding is valid, and false otherwise.

Field Detail

ENCODING_ALIAS_PREFIX

public static final String ENCODING_ALIAS_PREFIX

Method Detail

getEncoding

public Encoding getEncoding(String name)

getInstance

public static EncodingRegistry getInstance()

getPlatformDefaultEncoding

public static String getPlatformDefaultEncoding()
Helper method to read the platform default encoding from the VM's system properties.

Returns: the contents of the system property "file.encoding".

isSupportedEncoding

public boolean isSupportedEncoding(String encoding)
Returns true if the encoding is valid, and false otherwise.

Parameters: encoding the encoding (name).

Returns: A boolean.