MysqlCharset
Date: 2016-03-08

com.mysql.jdbc

## Class MysqlCharset

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

-      class MysqlCharset
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `charsetName`
    `java.util.List<java.lang.String>` | `javaEncodingsUc`
    `int` | `major`
    `int` | `mblen`
    `int` | `minor`
    `int` | `priority`
    `int` | `subminor`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MysqlCharset(java.lang.String charsetName, int mblen, int priority, java.lang.String[] javaEncodings)` Constructs MysqlCharset object
    `MysqlCharset(java.lang.String charsetName, int mblen, int priority, java.lang.String[] javaEncodings, int major, int minor)`
    `MysqlCharset(java.lang.String charsetName, int mblen, int priority, java.lang.String[] javaEncodings, int major, int minor, int subminor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) java.lang.String` | `getMatchingJavaEncoding(java.lang.String javaEncoding)` If javaEncoding parameter value is one of available java encodings for this charset then returns javaEncoding value as is.
    `(package private) boolean` | `isOkayForVersion(Connection conn)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### charsetName

          public final java.lang.String charsetName

    - #### mblen

          public final int mblen

    - #### priority

          public final int priority

    - #### javaEncodingsUc

          public final java.util.List<java.lang.String> javaEncodingsUc

    - #### major

          public int major

    - #### minor

          public int minor

    - #### subminor

          public int subminor

  - ### Constructor Detail

    - #### MysqlCharset

          public MysqlCharset(java.lang.String charsetName,
                      int mblen,
                      int priority,
                      java.lang.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(java.lang.String charsetName,
                      int mblen,
                      int priority,
                      java.lang.String[] javaEncodings,
                      int major,
                      int minor)

    - #### MysqlCharset

          public MysqlCharset(java.lang.String charsetName,
                      int mblen,
                      int priority,
                      java.lang.String[] javaEncodings,
                      int major,
                      int minor,
                      int subminor)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### isOkayForVersion

          boolean isOkayForVersion(Connection conn)
                             throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### getMatchingJavaEncoding

          java.lang.String getMatchingJavaEncoding(java.lang.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:
        `java.sql.SQLException`