KerberosTime ::= GeneralizedTime -- with no fractional seconds
The timestamps used in Kerberos are encoded as GeneralizedTimes. A
KerberosTime value shall not include any fractional portions of the
seconds. As required by the DER, it further shall not include any
separators, and it shall specify the UTC time zone (Z).
This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt. The implementation also includes the microseconds info so that the same class can be used as a precise timestamp in Authenticator etc.
| Modifier and Type | Field and Description |
|---|---|
| private static long | |
| private static long | |
| private final long | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public static int | |
| public int | |
| public int | |
| public long | |
| public boolean | |
| public boolean | |
| public boolean | |
| public int | |
| private boolean | |
| public boolean | |
| public boolean | |
| public static KerberosTime | |
| public static KerberosTime | Returns: an instance of KerberosTime.the Der input stream value, which contains
one or more marshaled value. data, byte tag number. explicitTag, boolean indicates if this data field is optional optional)Parse (unmarshal) a kerberostime from a DER input stream. |
| public Date | |
| public String | Returns: a string representation of this object.Returns a string representation of KerberosTime object. |
| private static long | |
| public String | |
| public KerberosTime | withMicroSeconds(int usec)
Returns a new KerberosTime object with the original seconds and the given microseconds. |
| initMicro | back to summary |
|---|---|
| private static long initMicro | |
| initMilli | back to summary |
|---|---|
| private static long initMilli | |
| kerberosTime | back to summary |
|---|---|
| private final long kerberosTime | |
| microSeconds | back to summary |
|---|---|
| private final int microSeconds | |
| KerberosTime | back to summary |
|---|---|
| private KerberosTime(long time, int micro) | |
| KerberosTime | back to summary |
|---|---|
| public KerberosTime(long time) Creates a KerberosTime object from milliseconds since epoch. | |
| KerberosTime | back to summary |
|---|---|
| public KerberosTime(String time) throws Asn1Exception | |
| KerberosTime | back to summary |
|---|---|
| public KerberosTime(Date time) Creates a KerberosTime object from a Date object. | |
| KerberosTime | back to summary |
|---|---|
| public KerberosTime(Instant instant) Creates a KerberosTime object from an Instant object | |
| asn1Encode | back to summary |
|---|---|
| public byte[] asn1Encode() throws Asn1Exception, IOException Encodes this object to a byte array.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getDefaultSkew | back to summary |
|---|---|
| public static int getDefaultSkew() | |
| getMicroSeconds | back to summary |
|---|---|
| public int getMicroSeconds() | |
| getSeconds | back to summary |
|---|---|
| public int getSeconds() | |
| getTime | back to summary |
|---|---|
| public long getTime() | |
| greaterThan | back to summary |
|---|---|
| public boolean greaterThan(KerberosTime time) | |
| greaterThanWRTClockSkew | back to summary |
|---|---|
| public boolean greaterThanWRTClockSkew(KerberosTime time, int clockSkew) | |
| greaterThanWRTClockSkew | back to summary |
|---|---|
| public boolean greaterThanWRTClockSkew(KerberosTime time) | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| inClockSkew | back to summary |
|---|---|
| private boolean inClockSkew(int clockSkew) | |
| inClockSkew | back to summary |
|---|---|
| public boolean inClockSkew() | |
| isZero | back to summary |
|---|---|
| public boolean isZero() | |
| now | back to summary |
|---|---|
| public static KerberosTime now() Creates a KerberosTime object for now. It uses System.nanoTime() to get a more precise time than "new Date()". | |
| parse | back to summary |
|---|---|
| public static KerberosTime parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException Parse (unmarshal) a kerberostime from a DER input stream. This form parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.
| |
| toDate | back to summary |
|---|---|
| public Date toDate() | |
| toGeneralizedTimeString | back to summary |
|---|---|
| public String toGeneralizedTimeString() Returns a string representation of KerberosTime object.
| |
| toKerberosTime | back to summary |
|---|---|
| private static long toKerberosTime(String time) throws Asn1Exception | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| withMicroSeconds | back to summary |
|---|---|
| public KerberosTime withMicroSeconds(int usec) Returns a new KerberosTime object with the original seconds and the given microseconds. | |