com.tivoli.twg.dmi
Class DMI_DateString

java.lang.Object
  extended bycom.tivoli.twg.dmi.DMI_DateString

public class DMI_DateString
extends java.lang.Object

This class is used to represent a DMI TimeStamp value.


Constructor Summary
DMI_DateString()
          Create a DMI_DateString value setting the fields to the current date and time.
DMI_DateString(byte[] Data)
          Create a DMI_DateString value based on the byte[] passed in.
 
Method Summary
 java.util.Calendar getCalendar()
          Accessor for returning this DateString as a java GregorianCalendar object.
 byte[] GetData()
          Accessor for retrieving this date object as a byte array.
 java.util.Date getDate()
          Accessor for returning the date as a java Date object.
 short getDay()
          Accessor for retrieving the Day from this date object.
 short getHour()
          Accessor for retrieving the Hour from this date object.
protected  int GetLen()
          Accessor for retrieving the length in octets of this date object.
 long getMicroseconds()
          Accessor for retrieving the Microseconds from this date object.
 short getMinutes()
          Accessor for retrieving the Minutes from this date object.
 short getMonth()
          Accessor for retrieving the Month from this date object.
 boolean getPlusOrMinus()
          Accessor for retrieving the Plus/Minus offset indicator from this date object.
 short getSeconds()
          Accessor for retrieving the Seconds from this date object.
 int getUTCOffset()
          Accessor for retrieving the UTC Offset from this date object.
 int getYear()
          Accessor for retrieving the Year from this date object.
 void SetData(byte[] Data)
          Accessor for setting this date object as a byte array that is formatted correctly as a DMI TimeStamp.
 void setDay(short da)
          Setter for setting the Day for this date object.
 void setMonth(short mo)
          Setter for setting the Month for this date object.
 void setYear(int yr)
          Setter for setting the Year for this date object.
 java.lang.String toString()
          Accessor for returning a displayable string representation of this date object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DMI_DateString

public DMI_DateString(byte[] Data)
Create a DMI_DateString value based on the byte[] passed in. This byte[] MUST be in the format prescribed by DMI V2.0 Specification.


DMI_DateString

public DMI_DateString()
Create a DMI_DateString value setting the fields to the current date and time.

Method Detail

getCalendar

public java.util.Calendar getCalendar()
Accessor for returning this DateString as a java GregorianCalendar object.

Returns:
GregorianCalendar

getDate

public java.util.Date getDate()
Accessor for returning the date as a java Date object.

Returns:
Date

toString

public java.lang.String toString()
Accessor for returning a displayable string representation of this date object.

Returns:
String

getYear

public int getYear()
Accessor for retrieving the Year from this date object.

Returns:
int

setYear

public void setYear(int yr)
Setter for setting the Year for this date object.

Parameters:
yr - - integer year

getMonth

public short getMonth()
Accessor for retrieving the Month from this date object.

Returns:
short

setMonth

public void setMonth(short mo)
Setter for setting the Month for this date object.

Parameters:
mo - - short month

getDay

public short getDay()
Accessor for retrieving the Day from this date object.

Returns:
short

setDay

public void setDay(short da)
Setter for setting the Day for this date object.

Parameters:
da - - short day

getHour

public short getHour()
Accessor for retrieving the Hour from this date object.

Returns:
short

getMinutes

public short getMinutes()
Accessor for retrieving the Minutes from this date object.

Returns:
short

getSeconds

public short getSeconds()
Accessor for retrieving the Seconds from this date object.

Returns:
short

getMicroseconds

public long getMicroseconds()
Accessor for retrieving the Microseconds from this date object.

Returns:
long

getPlusOrMinus

public boolean getPlusOrMinus()
Accessor for retrieving the Plus/Minus offset indicator from this date object.

Returns:
boolean - where true indicates a +

getUTCOffset

public int getUTCOffset()
Accessor for retrieving the UTC Offset from this date object.

Returns:
int

GetLen

protected int GetLen()
Accessor for retrieving the length in octets of this date object.

Returns:
int

GetData

public byte[] GetData()
Accessor for retrieving this date object as a byte array.

Returns:
byte[]

SetData

public void SetData(byte[] Data)
Accessor for setting this date object as a byte array that is formatted correctly as a DMI TimeStamp. sYear[4]; sMonth[2]; sDay[2]; sHour[2]; sMinutes[2]; sSeconds[2]; cDot; sMicroSeconds[6]; cPlusOrMinus; sUtcOffset[3]; iPadding[3];