## org.firebirdsql.encodings
Class EncodingFactory

    java.lang.Object
      org.firebirdsql.encodings.EncodingFactory

    public class EncodingFactory

extends Object

Field Summary
`static char[]` `DEFAULT_MAPPING` Default mapping table, provides an "identity" mapping.
`static String` `ISC_ENCODING_SIZE_RESOURCE`
`static String` `ISC_ENCODINGS_RESOURCE`

Constructor Summary
`EncodingFactory()`

Method Summary
`static Encoding` `createEncoding(String encoding)`
`static int` `getCharacterSetSize(int characterSetId)` Get size of a character for the specified character set.
`static Encoding` `getEncoding(String encoding)`
`static Encoding` `getEncoding(String encoding, char[] charMapping)`
`static Encoding` `getEncoding(String encoding, String mappingPath)`
`static String` `getIscEncoding(String javaEncoding)` Get InterBase encoding for given Java language encoding.
`static int` `getIscEncodingSize(String iscEncoding)` Get size of a character for the specified InterBase encoding.
`static String` `getJavaEncoding(String iscEncoding)` Get Java language encoding for given InterBase encoding.
`static CharacterTranslator` `getTranslator(String mappingPath)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_MAPPING

    public static final char[] DEFAULT_MAPPING

  Default mapping table, provides an "identity" mapping.

### ISC_ENCODING_SIZE_RESOURCE

    public static final String ISC_ENCODING_SIZE_RESOURCE

See Also:
  Constant Field Values

### ISC_ENCODINGS_RESOURCE

    public static final String ISC_ENCODINGS_RESOURCE

See Also:
  Constant Field Values

Constructor Detail

### EncodingFactory

    public EncodingFactory()

Method Detail

### createEncoding

    public static Encoding createEncoding(String encoding)

### getCharacterSetSize

    public static int getCharacterSetSize(int characterSetId)

  Get size of a character for the specified character set.

  Parameters:
    `characterSetId` - of the character set.
  Returns:
    maximum size of the character in bytes or 1 if charset was not found.

### getEncoding

    public static Encoding getEncoding(String encoding)

### getEncoding

    public static Encoding getEncoding(String encoding,
                                       char[] charMapping)

### getEncoding

    public static Encoding getEncoding(String encoding,
                                       String mappingPath)
                                throws SQLException

  Throws:
    `SQLException`

### getIscEncoding

    public static String getIscEncoding(String javaEncoding)

  Get InterBase encoding for given Java language encoding.

  Parameters:
    `javaEncoding` - Java language encoding.
  Returns:
    corresponding InterBase encoding or `null` if none found.

### getIscEncodingSize

    public static int getIscEncodingSize(String iscEncoding)

  Get size of a character for the specified InterBase encoding.

  Parameters:
    `iscEncoding` - InterBase encoding.
  Returns:
    maximum size of the character in bytes or 1 if encoding was not found.

### getJavaEncoding

    public static String getJavaEncoding(String iscEncoding)

  Get Java language encoding for given InterBase encoding.

  Parameters:
    `iscEncoding` - InterBase encoding
  Returns:
    corresponding Java encoding or `null` if none found.

### getTranslator

    public static CharacterTranslator getTranslator(String mappingPath)
                                             throws SQLException

  Throws:
    `SQLException`

Copyright © 2001-2010. All Rights Reserved.