Class BooleanCodec

  • All Implemented Interfaces:
    Codec<java.lang.Boolean>

    public class BooleanCodec
    extends java.lang.Object
    implements Codec<java.lang.Boolean>
    • Field Detail

      • COMPATIBLE_TYPES

        private static final java.util.EnumSet<DataType> COMPATIBLE_TYPES
    • Constructor Detail

      • BooleanCodec

        public BooleanCodec()
    • Method Detail

      • className

        public java.lang.String className()
        Specified by:
        className in interface Codec<java.lang.Boolean>
      • canEncode

        public boolean canEncode​(java.lang.Object value)
        Specified by:
        canEncode in interface Codec<java.lang.Boolean>
      • decodeText

        public java.lang.Boolean decodeText​(ReadableByteBuf buffer,
                                            int length,
                                            ColumnDefinitionPacket column,
                                            java.util.Calendar cal)
                                     throws java.sql.SQLDataException
        Specified by:
        decodeText in interface Codec<java.lang.Boolean>
        Throws:
        java.sql.SQLDataException
      • decodeTextBoolean

        public boolean decodeTextBoolean​(ReadableByteBuf buf,
                                         int length,
                                         ColumnDefinitionPacket column)
                                  throws java.sql.SQLDataException
        Throws:
        java.sql.SQLDataException
      • decodeBinary

        public java.lang.Boolean decodeBinary​(ReadableByteBuf buffer,
                                              int length,
                                              ColumnDefinitionPacket column,
                                              java.util.Calendar cal)
                                       throws java.sql.SQLDataException
        Specified by:
        decodeBinary in interface Codec<java.lang.Boolean>
        Throws:
        java.sql.SQLDataException
      • decodeBinaryBoolean

        public boolean decodeBinaryBoolean​(ReadableByteBuf buf,
                                           int length,
                                           ColumnDefinitionPacket column)
                                    throws java.sql.SQLDataException
        Throws:
        java.sql.SQLDataException
      • encodeText

        public void encodeText​(PacketWriter encoder,
                               Context context,
                               java.lang.Object value,
                               java.util.Calendar cal,
                               java.lang.Long maxLength)
                        throws java.io.IOException
        Specified by:
        encodeText in interface Codec<java.lang.Boolean>
        Throws:
        java.io.IOException
      • encodeBinary

        public void encodeBinary​(PacketWriter encoder,
                                 java.lang.Object value,
                                 java.util.Calendar cal,
                                 java.lang.Long maxLength)
                          throws java.io.IOException
        Specified by:
        encodeBinary in interface Codec<java.lang.Boolean>
        Throws:
        java.io.IOException
      • getBinaryEncodeType

        public int getBinaryEncodeType()
        Specified by:
        getBinaryEncodeType in interface Codec<java.lang.Boolean>