|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Protocol.Util.DLP_Date
A class to hold a Palm DLP protocol Date element. This class holds date information.
Constructor Summary | |
---|---|
DLP_Date()
Creates a new DLP date object using the current date and time. |
|
DLP_Date(byte[] data)
Create a new DLP date object with the specified DLP formatted date bytes. |
|
DLP_Date(java.util.Calendar calendar)
Create a new DLP date object using the specified date and time |
Method Summary | |
---|---|
static char |
calendar2DateType(java.util.Calendar calendar)
Converts the provided Calendar object to a DLP two-byte Date representation. |
byte[] |
convertToBytes()
Convert this date/time object to a series of DLP date/time bytes. |
java.util.Calendar |
convertToCalendar()
Converts this date object to a Calendar object. |
int |
convertToSeconds()
Convert this date object to the number of seconds since Jan 1st, 1904 @ 0000. |
static java.util.Calendar |
dateType2Calendar(byte[] data,
int i)
Convert the provided date byte array into a Calendar object. |
(package private) static java.util.Calendar |
seconds2Calendar(int i)
Convert a value representing seconds since Jan 1st 1904 @ 0000 to a Calendar object. |
java.lang.String |
toString()
Retreive this object as human-readable text. |
Methods inherited from class java.lang.Object |
---|
|
Constructor Detail |
public DLP_Date()
public DLP_Date(java.util.Calendar calendar) throws InvalidDLPDateException
calendar
- the date and time you want to set this date object to.InvalidDLPDateException
- thrown if the provided calendar contains invalid information, or is null.public DLP_Date(byte[] data) throws InvalidDLPDateException
data
- the date and time data you want to set this date object to.InvalidDLPDateException
- thrown if the provided data contains invalid information, or is null.Method Detail |
public static char calendar2DateType(java.util.Calendar calendar)
calendar
- the date to convert.public byte[] convertToBytes()
public java.util.Calendar convertToCalendar()
public int convertToSeconds()
public static java.util.Calendar dateType2Calendar(byte[] data, int i)
data
- an array containing DLP date information.i
- the offset into the array where the date information starts.static java.util.Calendar seconds2Calendar(int i)
i
- a value representing seconds since Jan 1st 1904 @ 0000.public java.lang.String toString()
toString
in class java.lang.Object
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |