org.mbari.siam.utils
Class OasisTimestamp

java.lang.Object
  extended by org.mbari.siam.utils.OasisTimestamp

public class OasisTimestamp
extends java.lang.Object

An adapter class to convert SIAM timestamps (Java time, long ms since epoch) to OASIS timestamps (decimal day of year). Notes: - This class is immutable - Assumes that all times are UTC


Constructor Summary
OasisTimestamp(long time)
          Constructor
 
Method Summary
 java.util.Date getDate()
          get Date represented by this timestamp
 double getOasisTime()
          get OASIS timestamp time as double
 long getTime()
          get time (ms since epoch represented by this timestamp
static void main(java.lang.String[] args)
          Convert specified long time to OasisTimestamp and send to stdout
 java.lang.String toString()
          get OASIS timestamp as String
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OasisTimestamp

public OasisTimestamp(long time)
Constructor

Method Detail

getTime

public long getTime()
get time (ms since epoch represented by this timestamp


getDate

public java.util.Date getDate()
get Date represented by this timestamp


getOasisTime

public double getOasisTime()
get OASIS timestamp time as double


toString

public java.lang.String toString()
get OASIS timestamp as String

Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
Convert specified long time to OasisTimestamp and send to stdout



Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.