Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.security.cert
Class Certificate.CertificateRep  view Certificate.CertificateRep download Certificate.CertificateRep.java

java.lang.Object
  extended byjava.security.cert.Certificate.CertificateRep
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Certificate

protected static class Certificate.CertificateRep
extends java.lang.Object
implements java.io.Serializable

Certificate.CertificateRep is an inner class used to provide an alternate storage mechanism for serialized Certificates.


Field Summary
private  byte[] data
          The encoded certificate data.
private static long serialVersionUID
          From JDK1.4.
private  java.lang.String type
          The certificate type, e.g.
 
Constructor Summary
protected Certificate.CertificateRep(java.lang.String type, byte[] data)
          Create an alternative representation of this certificate.
 
Method Summary
protected  java.lang.Object readResolve()
          Deserialize this certificate replacement into the appropriate certificate object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
From JDK1.4.

See Also:
Constant Field Values

type

private java.lang.String type
The certificate type, e.g. "X.509".


data

private byte[] data
The encoded certificate data.

Constructor Detail

Certificate.CertificateRep

protected Certificate.CertificateRep(java.lang.String type,
                                     byte[] data)
Create an alternative representation of this certificate. The (type, data) pair is typically the certificate's type as returned by Certificate.getType() 55 (i.e. the canonical name of the certificate type) and the encoded form as returned by Certificate.getEncoded() 55 .

For example, X.509 certificates would create an instance of this class with the parameters "X.509" and the ASN.1 representation of the certificate, encoded as DER bytes.

Method Detail

readResolve

protected java.lang.Object readResolve()
                                throws java.io.ObjectStreamException
Deserialize this certificate replacement into the appropriate certificate object. That is, this method attempts to create a CertificateFactory for this certificate's type, then attempts to parse the encoded data with that factory, returning the resulting certificate.