code: public byte[] getEncoded() throws CertificateEncodingException {
          try {
              if (encoded == null) {
                  DerOutputStream tmp = new DerOutputStream();
                  emit(tmp);
                  encoded = tmp.toByteArray();
              }
          } catch (IOException ex) {
              throw new CertificateEncodingException(ex.toString());
          }
          return encoded;
      }
docs: Return the DER encoded form of the certificate pair.
  
  @return The encoded form of the certificate pair.
  @throws CerticateEncodingException If an encoding exception occurs.