com.ibm.security.krb5.internal

Class KerberosTime

  1. java.lang.Object
  2. extended bycom.ibm.security.krb5.internal.KerberosTime
All implemented interfaces:
java.lang.Cloneable

  1. public class KerberosTime
  2. extends java.lang.Object
  3. implements java.lang.Cloneable
Implements the ASN.1 KerberosTime type. KerberosTime ::= GeneralizedTime --specifying UTC time zone (Z)

This definition reflects the Network Working Group RFC 1510 specifications dated September 1993 and available at http://www.ietf.org/rfc/rfc1510.txt.


Field Summary

Modifier and Type Field and Description
  1. static
  2. boolean
NOW
  1. static
  2. boolean
UNADJUSTED_NOW

Constructor Summary

Constructor and Description
KerberosTime()
KerberosTime(boolean initToNow)
KerberosTime(java.util.Date time)
KerberosTime(com.ibm.security.util.DerValue encoding)
Constructs a KerberosTime object.
KerberosTime(long time)
KerberosTime(java.lang.String time)

Method Summary

Modifier and Type Method and Description
  1. byte[]
asn1Encode()
Encodes this object to a byte array.
  1. java.lang.Object
clone()
  1. boolean
equals(KerberosTime time)
  1. int
getMicroSeconds()
  1. int
getSeconds()
  1. long
getTime()
  1. boolean
greaterThan(KerberosTime time)
  1. boolean
greaterThanWRTClockSkew(KerberosTime time)
  1. boolean
greaterThanWRTClockSkew(KerberosTime time,int clockSkew)
  1. boolean
inClockSkew()
  1. boolean
inClockSkew(int clockSkew)
  1. boolean
isZero()
  1. static
  2. KerberosTime
parse(com.ibm.security.util.DerInputStream data,byte explicitTag,boolean optional)
Parse (unmarshal) a kerberostime from a DER input stream.
  1. void
setMicroSeconds(int usec)
  1. void
setMicroSeconds(java.lang.Integer usec)
  1. void
setNow()
  1. void
setSeconds(int sec)
  1. void
setTime(java.util.Date time)
  1. void
setTime(long time)
  1. java.util.Date
toDate()
  1. java.lang.String
toGeneralizedTimeString()
Returns a string representation of KerberosTime object.
  1. static
  2. java.lang.String
zeroPad(java.lang.String s,int length)
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

NOW

  1. public static final boolean NOW
See Also:

UNADJUSTED_NOW

  1. public static final boolean UNADJUSTED_NOW
See Also:

Constructor Detail

KerberosTime

  1. public KerberosTime()

KerberosTime

  1. public KerberosTime(long time)

KerberosTime

  1. public KerberosTime(java.lang.String time)
  2. throws Asn1Exception
Throws:

KerberosTime

  1. public KerberosTime(com.ibm.security.util.DerValue encoding)
  2. throws Asn1Exception
  3. java.io.IOException
Constructs a KerberosTime object.
Parameters:
encoding - a DER-encoded data.
Throws:
Asn1Exception - if an error occurs while decoding an ASN1 encoded data.
java.io.IOException - if an I/O error occurs while reading encoded data.

KerberosTime

  1. public KerberosTime(java.util.Date time)

KerberosTime

  1. public KerberosTime(boolean initToNow)

Method Detail

clone

  1. public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

zeroPad

  1. public static java.lang.String zeroPad( java.lang.String s,
  2. int length)

toGeneralizedTimeString

  1. public java.lang.String toGeneralizedTimeString( )
Returns a string representation of KerberosTime object.
Returns:
a string representation of this object.

asn1Encode

  1. public byte[] asn1Encode()
  2. throws Asn1Exception
  3. java.io.IOException
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.
java.io.IOException - if an I/O error occurs while reading encoded data.

getTime

  1. public long getTime()

setTime

  1. public void setTime(java.util.Date time)

setTime

  1. public void setTime(long time)

toDate

  1. public java.util.Date toDate()

setNow

  1. public void setNow()

getMicroSeconds

  1. public int getMicroSeconds()

setMicroSeconds

  1. public void setMicroSeconds(int usec)

setMicroSeconds

  1. public void setMicroSeconds(java.lang.Integer usec)

inClockSkew

  1. public boolean inClockSkew(int clockSkew)

inClockSkew

  1. public boolean inClockSkew()

greaterThanWRTClockSkew

  1. public boolean greaterThanWRTClockSkew( KerberosTime time,
  2. int clockSkew)

greaterThanWRTClockSkew

  1. public boolean greaterThanWRTClockSkew( KerberosTime time)

greaterThan

  1. public boolean greaterThan(KerberosTime time)

equals

  1. public boolean equals(KerberosTime time)

isZero

  1. public boolean isZero()

getSeconds

  1. public int getSeconds()

setSeconds

  1. public void setSeconds(int sec)

parse

  1. public static KerberosTime parse( com.ibm.security.util.DerInputStream data,
  2. byte explicitTag,
  3. boolean optional)
  4. throws Asn1Exception
  5. java.io.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.
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
Returns:
an instance of KerberosTime.
Throws:
Asn1Exception - on error.
java.io.IOException