org.gcube.indexmanagement.bdbwrapper
Class CustomDate

java.lang.Object
  extended by java.util.Date
      extended by org.gcube.indexmanagement.bdbwrapper.CustomDate
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>

public class CustomDate
extends Date
implements Serializable

This class represents a date whose serialization is formed according to a custom date format.

Author:
Spyros Boutsis, NKUA, Vasilis Verroios, NKUA
See Also:
Serialized Form

Method Summary
 byte[] getBytes()
          Encodes the given CustomDate object to an array of bytes
static CustomDate toCustomDate(byte[] data)
          Reconstructs an CustomDate object from an array of bytes, produced using the getBytes method on a CustomDate object
 String toString()
           
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Date

getBytes

public byte[] getBytes()
Encodes the given CustomDate object to an array of bytes

Returns:
the array of bytes

toCustomDate

public static CustomDate toCustomDate(byte[] data)
Reconstructs an CustomDate object from an array of bytes, produced using the getBytes method on a CustomDate object

Parameters:
data - the array of bytes
Returns:
the new CustomDate object


Copyright © 2013. All Rights Reserved.