Interface Codec<T>

    • Method Detail

      • className

        java.lang.String className()
      • canEncode

        boolean canEncode​(java.lang.Object value)
      • decodeText

        T decodeText​(ReadableByteBuf buffer,
                     int length,
                     ColumnDefinitionPacket column,
                     java.util.Calendar cal)
              throws java.sql.SQLDataException
        Throws:
        java.sql.SQLDataException
      • decodeBinary

        T decodeBinary​(ReadableByteBuf buffer,
                       int length,
                       ColumnDefinitionPacket column,
                       java.util.Calendar cal)
                throws java.sql.SQLDataException
        Throws:
        java.sql.SQLDataException
      • encodeText

        void encodeText​(PacketWriter encoder,
                        Context context,
                        java.lang.Object value,
                        java.util.Calendar cal,
                        java.lang.Long length)
                 throws java.io.IOException,
                        java.sql.SQLException
        Throws:
        java.io.IOException
        java.sql.SQLException
      • encodeBinary

        void encodeBinary​(PacketWriter encoder,
                          java.lang.Object value,
                          java.util.Calendar cal,
                          java.lang.Long length)
                   throws java.io.IOException,
                          java.sql.SQLException
        Throws:
        java.io.IOException
        java.sql.SQLException
      • canEncodeLongData

        default boolean canEncodeLongData()
      • encodeLongData

        default void encodeLongData​(PacketWriter encoder,
                                    T value,
                                    java.lang.Long length)
                             throws java.io.IOException,
                                    java.sql.SQLException
        Throws:
        java.io.IOException
        java.sql.SQLException
      • encodeData

        default byte[] encodeData​(T value,
                                  java.lang.Long length)
                           throws java.io.IOException,
                                  java.sql.SQLException
        Throws:
        java.io.IOException
        java.sql.SQLException
      • getBinaryEncodeType

        int getBinaryEncodeType()