Code example for Date

Methods: getTime

0
  @Override 
  public ByteBuffer toByteBuffer(Date obj) {
    if (obj == null) {
      return null; 
    } 
    return LONG_SERIALIZER.toByteBuffer(obj.getTime());
  } 
 
  @Override 
  public Date fromByteBuffer(ByteBuffer bytes) {
    if (bytes == null) {
      return null; 
    } 
    return new Date(LONG_SERIALIZER.fromByteBuffer(bytes));
  } 
}