| java.lang.Object |
| ↳ |
sun.security.mule.krb5.internal.KerberosTime |
Class Overview
Implements the ASN.1 KerberosTime type.
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.
Summary
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Constants
public
static
final
boolean
NOW
public
static
final
boolean
UNADJUSTED_NOW
Fields
private
static
boolean
DEBUG
private
long
kerberosTime
private
static
long
syncTime
Public Constructors
public
KerberosTime
(Config kerberosConfig)
public
KerberosTime
(long time, Config kerberosConfig)
public
KerberosTime
(String time, Config kerberosConfig)
public
KerberosTime
(DerValue encoding, Config kerberosConfig)
Constructs a KerberosTime object.
Parameters
| encoding
| A DER-encoded data. |
| kerberosConfig
| |
Throws
| Asn1Exception
| if an error occurs while decoding an ASN1 encoded data. |
| IOException
| if an I/O error occurs while reading encoded data.
|
public
KerberosTime
(Date time, Config kerberosConfig)
public
KerberosTime
(boolean initToNow, Config kerConfig)
Public Methods
public
byte[]
asn1Encode
()
Encodes this object to a byte array.
Returns
- a byte array of encoded data.
Throws
| Asn1Exception
| if an error occurs while decoding an ASN1 encoded data. |
| IOException
| if an I/O error occurs while reading encoded data.
|
public
boolean
equals
(Object obj)
public
static
int
getDefaultSkew
(Config kerberosConfig)
public
int
getMicroSeconds
()
public
boolean
greaterThanWRTClockSkew
(KerberosTime time, int clockSkew)
public
boolean
inClockSkew
(int clockSkew, KerberosTime now)
public
boolean
inClockSkew
(int clockSkew)
public
boolean
inClockSkew
()
public
static
KerberosTime
parse
(DerInputStream data, byte explicitTag, boolean optional, Config kerberosConfig)
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.
Parameters
| data
| The Der input stream value, which contains one or more marshaled value. |
| explicitTag
| Tag number. |
| optional
| Indicates if this data field is optional |
| kerberosConfig
| |
Returns
- an instance of KerberosTime.
public
void
setMicroSeconds
(int usec)
public
void
setMicroSeconds
(Integer usec)
public
void
setSeconds
(int sec)
public
void
setTime
(long time)
public
void
setTime
(Date time)
public
String
toGeneralizedTimeString
()
Returns a string representation of KerberosTime object.
Returns
- a string representation of this object.
public
String
toString
()
public
static
String
zeroPad
(String s, int length)