|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.net.ntp.TimeStamp
public class TimeStamp
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()
This constructs a timestamp initialized with the current date. |
|
TimeStamp(byte[] data)
This constructs a timestamp starting from an eight byte array. |
|
TimeStamp(java.util.Date date)
This constructs a timestamp initialized with a given date. |
|
| Method Summary | |
|---|---|
boolean |
equals(TimeStamp ts)
Checks for equality of two timestamps. |
byte[] |
getData()
Returns the eight byte array associated to a timestamp. |
java.util.Date |
getTime()
Returns the date associated to a timestamp. |
java.lang.String |
toString()
DOCUMENT ME! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TimeStamp zero
| Constructor Detail |
|---|
public TimeStamp()
public TimeStamp(java.util.Date date)
date - DOCUMENT ME!public TimeStamp(byte[] data)
data - DOCUMENT ME!| Method Detail |
|---|
public boolean equals(TimeStamp ts)
ts - DOCUMENT ME!
public java.lang.String toString()
toString in class java.lang.Objectpublic byte[] getData()
public java.util.Date getTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||