org.apache.cassandra.serializers

## Class SimpleDateSerializer

- java.lang.Object
- - org.apache.cassandra.serializers.SimpleDateSerializer

All Implemented Interfaces:
  TypeSerializer<java.lang.Integer>

    public class SimpleDateSerializer
    extends java.lang.Object
    implements TypeSerializer<java.lang.Integer>

### Field Summary

Fields
`static SimpleDateSerializer` `instance`

### Constructor Summary

Constructors
Constructor and Description
`SimpleDateSerializer()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `dateStringToDays(java.lang.String source)`
`static long` `dayToTimeInMillis(int days)`
`java.lang.Integer` `deserialize(java.nio.ByteBuffer bytes)`
`java.lang.Class<java.lang.Integer>` `getType()`
`java.nio.ByteBuffer` `serialize(java.lang.Integer value)`
`static int` `timeInMillisToDay(long millis)`
`java.lang.String` `toString(java.lang.Integer value)`
`void` `validate(java.nio.ByteBuffer bytes)`

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

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

### Methods inherited from interface org.apache.cassandra.serializers.TypeSerializer

`toCQLLiteral`

### Field Detail

#### instance

    public static final SimpleDateSerializer instance

### Constructor Detail

#### SimpleDateSerializer

    public SimpleDateSerializer()

### Method Detail

#### deserialize

    public java.lang.Integer deserialize(java.nio.ByteBuffer bytes)

Specified by:
  `deserialize` in interface `TypeSerializer<java.lang.Integer>`

#### serialize

    public java.nio.ByteBuffer serialize(java.lang.Integer value)

Specified by:
  `serialize` in interface `TypeSerializer<java.lang.Integer>`

#### dateStringToDays

    public static int dateStringToDays(java.lang.String source)
                                throws MarshalException

Throws:
  `MarshalException`

#### timeInMillisToDay

    public static int timeInMillisToDay(long millis)

#### dayToTimeInMillis

    public static long dayToTimeInMillis(int days)

#### validate

    public void validate(java.nio.ByteBuffer bytes)
                  throws MarshalException

Specified by:
  `validate` in interface `TypeSerializer<java.lang.Integer>`
Throws:
  `MarshalException`

#### toString

    public java.lang.String toString(java.lang.Integer value)

Specified by:
  `toString` in interface `TypeSerializer<java.lang.Integer>`

#### getType

    public java.lang.Class<java.lang.Integer> getType()

Specified by:
  `getType` in interface `TypeSerializer<java.lang.Integer>`