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


Constructor Index

 o NTPTime(byte[])
CONSTRUCTOR: builds a new NTPTime instance given its encoding in the NTP packet as an array of bytes.
 o NTPTime(long)
CONSTRUCTOR: builds a new NTPTime instance given a long representing a time in millisecs according with Java APIs.

Method Index

 o toBytes()
ACCESSOR: returns an array of bytes that represents this NTPTime according with the NTP encoding
 o toLong()
ACCESSOR: returns a long integer that represents this object in according with Java APIs

Constructors

 o 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).
 o 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.

Methods

 o 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
 o 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