All Packages Class Hierarchy This Package Previous Next Index
Class syd.remoteclock.NTPTime
java.lang.Object
|
+----syd.remoteclock.NTPTime
- public class NTPTime
- extends Object
This class supports the NTP encoding of time information
-
NTPTime(byte[])
- CONSTRUCTOR: builds a new
NTPTime
instance given its
encoding in the NTP packet as an array of bytes.
-
NTPTime(long)
- CONSTRUCTOR: builds a new
NTPTime
instance given a long
representing a time in millisecs according with Java APIs.
-
toBytes()
- ACCESSOR: returns an array of bytes that represents this
NTPTime
according with the NTP encoding
-
toLong()
- ACCESSOR: returns a long integer that represents this object in
according with Java APIs
NTPTime
public NTPTime(long par)
- CONSTRUCTOR: builds a new
NTPTime
instance given a long
representing a time in millisecs according with Java APIs.
- Parameters:
- par - a long integer representing a time (in millisecs).
NTPTime
public NTPTime(byte par[])
- CONSTRUCTOR: builds a new
NTPTime
instance given its
encoding in the NTP packet as an array of bytes.
- Parameters:
- par - a byte array containing the NTP encoding of the time.
toLong
public long toLong()
- ACCESSOR: returns a long integer that represents this object in
according with Java APIs
- Returns:
- s a long integer representing millisecs
toBytes
public byte[] toBytes()
- ACCESSOR: returns an array of bytes that represents this
NTPTime
according with the NTP encoding
- Returns:
- an array of bytes representing this object
All Packages Class Hierarchy This Package Previous Next Index