|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.kerberos.KerberosTime
public class KerberosTime
An specialization of the ASN.1 GeneralTime. The Kerberos time contains date and time up to the seconds, but with no fractional seconds. It's also always expressed as UTC timeZone, thus the 'Z' at the end of its string representation.
| Field Summary | |
|---|---|
static int |
DAY
The number of milliseconds in a day. |
static KerberosTime |
INFINITY
Constant for the KerberosTime "infinity." |
static int |
MINUTE
The number of milliseconds in a minute. |
static int |
WEEK
The number of milliseconds in a week. |
| Constructor Summary | |
|---|---|
KerberosTime()
Creates a new instance of a KerberosTime object |
|
KerberosTime(Date time)
Creates a new instance of KerberosTime. |
|
KerberosTime(long date)
Creates a new instance of a KerberosTime object |
|
KerberosTime(String date)
Creates a new instance of a KerberosTime object |
|
| Method Summary | |
|---|---|
int |
compareTo(KerberosTime that)
compares current kerberos time with the given kerberos time |
boolean |
equals(Object obj)
|
byte[] |
getBytes()
|
String |
getDate()
|
long |
getTime()
Returns the KerberosTime as a long. |
static KerberosTime |
getTime(String zuluTime)
Returns the KerberosTime for a given zulu time. |
boolean |
greaterThan(KerberosTime ktime)
checks if the current kerberos time is greater than the given kerberos time |
int |
hashCode()
|
boolean |
isInClockSkew(long clockSkew)
Returns whether this KerberosTime is within the given clockskew. |
boolean |
isZero()
Returns whether this KerberosTime is zero. |
boolean |
lessThan(KerberosTime ktime)
checks if the current kerberos time is less or equal than the given kerberos time |
void |
setDate(String date)
Sets the date if it's a valid KerberosTime |
Date |
toDate()
Returns the KerberosTime as a Date. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final KerberosTime INFINITY
KerberosTime "infinity."
public static final int MINUTE
public static final int DAY
public static final int WEEK
| Constructor Detail |
|---|
public KerberosTime()
public KerberosTime(String date)
date - the KerberosTime to storepublic KerberosTime(long date)
public KerberosTime(Date time)
time - | Method Detail |
|---|
public long getTime()
KerberosTime as a long.
KerberosTime as a long.public Date toDate()
KerberosTime as a Date.
KerberosTime as a Date.
public static KerberosTime getTime(String zuluTime)
throws ParseException
KerberosTime for a given zulu time.
zuluTime -
KerberosTime.
ParseException
public void setDate(String date)
throws ParseException
date - The date to store
ParseExceptionpublic byte[] getBytes()
public String getDate()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic boolean isInClockSkew(long clockSkew)
KerberosTime is within the given clockskew.
clockSkew -
KerberosTime is within the given clockskew.public int compareTo(KerberosTime that)
compareTo in interface Comparable<KerberosTime>that - the kerberos time against which the current kerberos time is compared
public boolean lessThan(KerberosTime ktime)
ktime - the kerberos time against which the current kerberos time needs to be compared
public boolean greaterThan(KerberosTime ktime)
ktime - the kerberos time against which the currnet kerberos time needs to be compared
public boolean isZero()
KerberosTime is zero.
KerberosTime is zero.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||