FileDocCategorySizeDatePackage
Message.javaAPI DocExample1146Sat Jan 13 14:25:04 GMT 2001javasec.samples.ch12

Message

public class Message extends Object implements Serializable

Fields Summary
SignedObject
object
transient Certificate
certificate
Constructors Summary
Methods Summary
private voidreadObject(java.io.ObjectInputStream in)

        in.defaultReadObject();
        try {
            byte b[] = (byte []) in.readObject();
            CertificateFactory cf = 
                        CertificateFactory.getInstance("X509");
            certificate = cf.generateCertificate(new 
                             ByteArrayInputStream(b));
        } catch (CertificateException ce) {
            throw new IOException("Can't de-serialize object " + ce);
        }
    
private voidwriteObject(java.io.ObjectOutputStream out)

        out.defaultWriteObject();
        try {
            out.writeObject(certificate.getEncoded());
        } catch (CertificateEncodingException cee) {
            throw new IOException("Can't serialize object " + cee);
        }