Class MysqlCharset

java.lang.Object
com.mysql.jdbc.MysqlCharset

class MysqlCharset extends Object
  • Field Details

    • charsetName

      public final String charsetName
    • mblen

      public final int mblen
    • priority

      public final int priority
    • javaEncodingsUc

      public final List<String> javaEncodingsUc
    • major

      public int major
    • minor

      public int minor
    • subminor

      public int subminor
  • Constructor Details

    • MysqlCharset

      public MysqlCharset(String charsetName, int mblen, int priority, String[] javaEncodings)
      Constructs MysqlCharset object
      Parameters:
      charsetName - MySQL charset name
      mblen - Max number of bytes per character
      priority - MysqlCharset with highest lever of this param will be used for Java encoding --> Mysql charsets conversion.
      javaEncodings - List of Java encodings corresponding to this MySQL charset; the first name in list is the default for mysql --> java data conversion
    • MysqlCharset

      public MysqlCharset(String charsetName, int mblen, int priority, String[] javaEncodings, int major, int minor)
    • MysqlCharset

      public MysqlCharset(String charsetName, int mblen, int priority, String[] javaEncodings, int major, int minor, int subminor)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isOkayForVersion

      boolean isOkayForVersion(Connection conn) throws SQLException
      Throws:
      SQLException
    • getMatchingJavaEncoding

      String getMatchingJavaEncoding(String javaEncoding)
      If javaEncoding parameter value is one of available java encodings for this charset then returns javaEncoding value as is. Otherwise returns first available java encoding name.
      Parameters:
      javaEncoding -
      Throws:
      SQLException