org.firebirdsql.encodings

## Interface EncodingSet

- All Known Implementing Classes:
    DefaultEncodingSet

      public interface EncodingSet

  `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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<EncodingDefinition>` | `getEncodings()`
    `int` | `getPreferenceWeight()` Preference weight defines the loading order.

- - ### Method Detail

    - #### getPreferenceWeight

          int getPreferenceWeight()

      Preference weight defines the loading order.

      An `EncodingSet` with a higher number is processed before a lower number. The default preference weight used by `DefaultEncodingSet` in Jaybird is 0. 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

          java.util.List<EncodingDefinition> getEncodings()

      Returns:
        List of `EncodingDefinition` implementations.

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.