Package org.firebirdsql.encodings
Interface EncodingDefinition
- 
- All Known Implementing Classes:
- DefaultEncodingDefinition
 
 public interface EncodingDefinitionDefinition of a Firebird encoding. This is a mapping from the Firebird encoding to a Java Charset and additional information needed by Jaybird to process this encoding.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description EncodinggetEncoding()Gets theEncodingbased on this definition.intgetFirebirdCharacterSetId()java.lang.StringgetFirebirdEncodingName()java.nio.charset.CharsetgetJavaCharset()java.lang.StringgetJavaEncodingName()intgetMaxBytesPerChar()booleanisFirebirdOnly()Can (or should) this encoding be used for reverse mapping from Java to Firebird.booleanisInformationOnly()Can this implementation create anEncodinginstance, or does it provide information only (eg about unsupported character sets)
 
- 
- 
- 
Method Detail- 
getMaxBytesPerCharint getMaxBytesPerChar() - Returns:
- Maximum number of bytes per character.
 
 - 
getJavaEncodingNamejava.lang.String getJavaEncodingName() - Returns:
- Java name of the encoding
 
 - 
getJavaCharsetjava.nio.charset.Charset getJavaCharset() - Returns:
- Java Charsetfor this encoding
 
 - 
getFirebirdEncodingNamejava.lang.String getFirebirdEncodingName() - Returns:
- Firebird name of the encoding
 
 - 
getFirebirdCharacterSetIdint getFirebirdCharacterSetId() - Returns:
- Firebird id of the encoding
 
 - 
isFirebirdOnlyboolean isFirebirdOnly() Can (or should) this encoding be used for reverse mapping from Java to Firebird.The best example of this is the Firebird character set UNICODE-FSSwhich maps to the Java character setUTF-8, but when Java character setUTF-8is requested, Jaybird should (in general) map to Firebird character setUTF8.- Returns:
- truewhen this encoding maps from Java to Firebird,- falseotherwise
 
 - 
isInformationOnlyboolean isInformationOnly() Can this implementation create anEncodinginstance, or does it provide information only (eg about unsupported character sets)- Returns:
- trueif this EncodingDefinition only provides information, and is not capable of building a concrete implementation.
 
 - 
getEncodingEncoding getEncoding() Gets theEncodingbased on this definition.Implementations can return the same instance on every call, or create a new one each time this method is called - Returns:
- Encoding object or nullif this is an information only EncodingDefinition
- See Also:
- isInformationOnly()
 
 
- 
 
-