|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkrb5.lib.KerberosTime
public class KerberosTime
TODO Class Description : KerberosTime class. A modified version of the code obtained from the Open Group Research Institute.
Field Summary | |
---|---|
static boolean |
NOW
Indicates whether it is NOW (default to true) |
Constructor Summary | |
---|---|
KerberosTime()
Class constructor |
|
KerberosTime(boolean initToNow)
Class constructor |
|
KerberosTime(java.util.Date time)
Class constructor |
|
KerberosTime(long time)
Class constructor |
|
KerberosTime(java.lang.String time)
Class constructor |
Method Summary | |
---|---|
java.lang.Object |
clone()
Clones a copy of the object |
boolean |
equals(KerberosTime time)
Compares two Kerberos Times |
int |
getMilliSeconds()
Returns value in millisecond |
int |
getSeconds()
Returns time in second unit |
long |
getTime()
Returns the kerberos time value |
boolean |
greaterThan(KerberosTime time)
Compares two Kerberos Times |
boolean |
greaterThanWRTClockSkew(KerberosTime time)
Checks the WRT Clock Skew |
boolean |
greaterThanWRTClockSkew(KerberosTime time,
int clockSkew)
Checks the WRT Clock Skew |
boolean |
inClockSkew()
Checks whether the kerbertime is within the clock skew |
boolean |
inClockSkew(int clockSkew)
Checks whether the kerbertime is within the clock skew specified scope |
boolean |
isZero()
if the time is 0 |
static void |
main(java.lang.String[] argv)
Uses for unit testing only |
void |
setMilliSeconds(int usec)
Sets the millisecond value |
void |
setMilliSeconds(java.lang.Integer usec)
Sets the millisecond value |
void |
setNow()
Sets to the current time |
void |
setSeconds(int sec)
Sets time in second unit |
void |
setTime(java.util.Date time)
Sets the kerberos time value |
void |
setTime(long time)
Sets the kerberos time value |
java.util.Date |
toDate()
Returns the date |
java.lang.String |
toGeneralizedTimeString()
Converts the object to generalized time string |
static long |
toKerberosTime(java.lang.String time)
Converts time to Kerberos Time |
static java.lang.String |
zeroPad(java.lang.String s,
int length)
Pads with 0 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean NOW
Constructor Detail |
---|
public KerberosTime()
public KerberosTime(long time)
time
- longpublic KerberosTime(boolean initToNow)
initToNow
- booleanpublic KerberosTime(java.lang.String time) throws KrbException
time
- String
KrbException
public KerberosTime(java.util.Date time)
time
- DateMethod Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public static long toKerberosTime(java.lang.String time) throws KrbException
time
- String
KrbException
public static java.lang.String zeroPad(java.lang.String s, int length)
s
- Stringlength
- int
public java.lang.String toGeneralizedTimeString()
public long getTime()
public void setTime(java.util.Date time)
time
- Datepublic void setTime(long time)
time
- longpublic java.util.Date toDate()
public void setNow()
public int getMilliSeconds()
public void setMilliSeconds(int usec)
usec
- intpublic void setMilliSeconds(java.lang.Integer usec)
usec
- Integerpublic boolean inClockSkew(int clockSkew)
clockSkew
- int
public boolean inClockSkew()
public boolean greaterThanWRTClockSkew(KerberosTime time, int clockSkew)
time
- KerberosTimeclockSkew
- int
public boolean greaterThanWRTClockSkew(KerberosTime time)
time
- KerberosTime
public boolean greaterThan(KerberosTime time)
time
- KerberosTime
public boolean equals(KerberosTime time)
time
- KerberosTime
public boolean isZero()
public int getSeconds()
public void setSeconds(int sec)
sec
- intpublic static void main(java.lang.String[] argv) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |