code: protected Object writeReplace() throws java.io.ObjectStreamException {
          try {
              return new CertificateRep(type, getEncoded());
          } catch (CertificateException e) {
              throw new java.io.NotSerializableException
                                  ("java.security.cert.Certificate: " +
                                  type +
                                  ": " +
                                  e.getMessage());
          }
      }
docs: Replace the Certificate to be serialized.
  
  @return the alternate Certificate object to be serialized
  
  @throws java.io.ObjectStreamException if a new object representing
  this Certificate could not be created
  @since 1.3