Class TimestampCodec

  • All Implemented Interfaces:
    Codec<java.sql.Timestamp>

    public class TimestampCodec
    extends java.lang.Object
    implements Codec<java.sql.Timestamp>
    • Field Detail

      • COMPATIBLE_TYPES

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

      • TimestampCodec

        public TimestampCodec()
    • Method Detail

      • className

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

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

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

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

        public void encodeText​(PacketWriter encoder,
                               Context context,
                               java.lang.Object val,
                               java.util.Calendar providedCal,
                               java.lang.Long maxLen)
                        throws java.io.IOException
        Specified by:
        encodeText in interface Codec<java.sql.Timestamp>
        Throws:
        java.io.IOException
      • encodeBinary

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

        public int getBinaryEncodeType()
        Specified by:
        getBinaryEncodeType in interface Codec<java.sql.Timestamp>