public void encode(OutputStream out) throws IOException {
  DerOutputStream tmp=new DerOutputStream();
  if (extensionValue == null) {
    extensionId=PKIXExtensions.CertificatePolicies_Id;
    critical=false;
    encodeThis();
  }
  super.encode(tmp);
  out.write(tmp.toByteArray());
}

public void encode ( OutputStream out ) throws IOException { DerOutputStream tmp = new DerOutputStream ( ) ; if ( extensionValue == null ) { extensionId = PKIXExtensions . CertificatePolicies_Id ; critical = false ; encodeThis ( ) ; } super . encode ( tmp ) ; out . write ( tmp . toByteArray ( ) ) ; }
write the extension to the deroutputstream .
