- All Known Implementing Classes:
DefaultEncodingSet
EncodingSet is an interface for the purpose of loading EncodingDefinition mappings into Jaybird.
Jaybird uses the ServiceLoader mechanism to load the EncodingSet. An implementation must
provide a no-arg constructor, and it must be listed in META-INF/services/org.firebirdsql.encodings.EncodingSet
Providing an EncodingSet in general is not necessary, as Jaybird provides a default. However if Jaybird does not include an encoding, or the current mapping from Firebird to Java (or reverse) doesn't match your requirements, then you can use this mechanism to override it.
The encoding information is only loaded once, so the definition will need to be available in the classpath of the class loader that initially loads and initializes Jaybird.
- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Method Summary
Modifier and TypeMethodDescriptionintPreference weight defines the loading order.
-
Method Details
-
getPreferenceWeight
int getPreferenceWeight()Preference weight defines the loading order.An
EncodingSetwith a higher number is processed before a lower number. The default preference weight used byDefaultEncodingSetin Jaybird is0. This means that if you want to override any default definition, you need a higher number, if you just want to specify additional mappings, you need to specify a lower number.- Returns:
- Preference weight
-
getEncodings
List<EncodingDefinition> getEncodings()- Returns:
- List of
EncodingDefinitionimplementations.
-