quamj.qps.util.ntp
Class TimeStamp

java.lang.Object
  |
  +--quamj.qps.util.ntp.TimeStamp

public class TimeStamp
extends java.lang.Object

This class encapsulates the notion of a timestamp as in rfc2030. Logically it is the number of seconds since the beginning of the centure (in UTC time). It is represented as an 8 byte array, the first four bytes representing seconds and the next 4 bytes representing second fractions.


Field Summary
static TimeStamp zero
          The timestamp corresponding to the beginning of the century.
 
Constructor Summary
TimeStamp()
           
TimeStamp(byte[] data)
           
TimeStamp(java.util.Date date)
           
 
Method Summary
 boolean equals(TimeStamp ts)
           
 byte[] getData()
           
 java.util.Date getTime()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

zero

public static final TimeStamp zero
The timestamp corresponding to the beginning of the century.

Constructor Detail

TimeStamp

public TimeStamp()

TimeStamp

public TimeStamp(java.util.Date date)

TimeStamp

public TimeStamp(byte[] data)
Method Detail

equals

public boolean equals(TimeStamp ts)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getData

public byte[] getData()

getTime

public java.util.Date getTime()