FileDocCategorySizeDatePackage
ASN1Time.javaAPI DocAndroid 1.5 API2049Wed May 06 22:41:06 BST 2009org.apache.harmony.security.asn1

ASN1Time

public abstract class ASN1Time extends ASN1StringType
Abstract class to represent ASN.1 time types
see
ASN.1

Fields Summary
Constructors Summary
public ASN1Time(int tagNumber)
TODO Put ctor description here

param
tagNumber

        super(tagNumber);
    
Methods Summary
public java.lang.ObjectgetDecodedObject(BerInputStream in)

        
        // TODO optimize me:
        // It makes sense use calendar instance instead of times array
        GregorianCalendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
        
        c.set(Calendar.YEAR, in.times[0]);
        c.set(Calendar.MONTH, in.times[1]-1);
        c.set(Calendar.DAY_OF_MONTH, in.times[2]);
        c.set(Calendar.HOUR_OF_DAY, in.times[3]);
        c.set(Calendar.MINUTE, in.times[4]);
        c.set(Calendar.SECOND, in.times[5]);
        c.set(Calendar.MILLISECOND, in.times[6]);
        
        return c.getTime();