Class BigDecimalCodec

  • All Implemented Interfaces:
    Codec<java.math.BigDecimal>

    public class BigDecimalCodec
    extends java.lang.Object
    implements Codec<java.math.BigDecimal>
    • Field Detail

      • COMPATIBLE_TYPES

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

      • BigDecimalCodec

        public BigDecimalCodec()
    • Method Detail

      • className

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

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

        public java.math.BigDecimal decodeText​(ReadableByteBuf buf,
                                               int length,
                                               ColumnDefinitionPacket column,
                                               java.util.Calendar cal)
                                        throws java.sql.SQLDataException
        Specified by:
        decodeText in interface Codec<java.math.BigDecimal>
        Throws:
        java.sql.SQLDataException
      • decodeBinary

        public java.math.BigDecimal decodeBinary​(ReadableByteBuf buf,
                                                 int length,
                                                 ColumnDefinitionPacket column,
                                                 java.util.Calendar cal)
                                          throws java.sql.SQLDataException
        Specified by:
        decodeBinary in interface Codec<java.math.BigDecimal>
        Throws:
        java.sql.SQLDataException
      • encodeText

        public void encodeText​(PacketWriter encoder,
                               Context context,
                               java.lang.Object value,
                               java.util.Calendar cal,
                               java.lang.Long length)
                        throws java.io.IOException
        Specified by:
        encodeText in interface Codec<java.math.BigDecimal>
        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.math.BigDecimal>
        Throws:
        java.io.IOException
      • getBinaryEncodeType

        public int getBinaryEncodeType()
        Specified by:
        getBinaryEncodeType in interface Codec<java.math.BigDecimal>