@Override public String toString(){
  StringBuilder sb=new StringBuilder();
  sb.append(serialNumber.toString());
  sb.append("  On: " + revocationDate.toString());
  if (certIssuer != null) {
    sb.append("\n    Certificate issuer: " + certIssuer);
  }
  if (extensions != null) {
    Collection<Extension> allEntryExts=extensions.getAllExtensions();
    Extension[] exts=allEntryExts.toArray(new Extension[0]);
    sb.append("\n    CRL Entry Extensions: " + exts.length);
    for (int i=0; i < exts.length; i++) {
      sb.append("\n    [" + (i + 1) + "]: ");
      Extension ext=exts[i];
      try {
        if (OIDMap.getClass(ext.getExtensionId()) == null) {
          sb.append(ext.toString());
          byte[] extValue=ext.getExtensionValue();
          if (extValue != null) {
            DerOutputStream out=new DerOutputStream();
            out.putOctetString(extValue);
            extValue=out.toByteArray();
            HexDumpEncoder enc=new HexDumpEncoder();
            sb.append("Extension unknown: " + "DER encoded OCTET string =\n" + enc.encodeBuffer(extValue) + "\n");
          }
        }
 else         sb.append(ext.toString());
      }
 catch (      Exception e) {
        sb.append(", Error parsing this extension");
      }
    }
  }
  sb.append("\n");
  return sb.toString();
}

@ Override public String toString ( ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( serialNumber . toString ( ) ) ; sb . append ( "  On: " + revocationDate . toString ( ) ) ; if ( certIssuer != null ) { sb . append ( "\n    Certificate issuer: " + certIssuer ) ; } if ( extensions != null ) { Collection < Extension > allEntryExts = extensions . getAllExtensions ( ) ; Extension [ ] exts = allEntryExts . toArray ( new Extension [ 0 ] ) ; sb . append ( "\n    CRL Entry Extensions: " + exts . length ) ; for ( int i = 0 ; i < exts . length ; i ++ ) { sb . append ( "\n    [" + ( i + 1 ) + "]: " ) ; Extension ext = exts [ i ] ; try { if ( OIDMap . getClass ( ext . getExtensionId ( ) ) == null ) { sb . append ( ext . toString ( ) ) ; byte [ ] extValue = ext . getExtensionValue ( ) ; if ( extValue != null ) { DerOutputStream out = new DerOutputStream ( ) ; out . putOctetString ( extValue ) ; extValue = out . toByteArray ( ) ; HexDumpEncoder enc = new HexDumpEncoder ( ) ; sb . append ( "Extension unknown: " + "DER encoded OCTET string =\n" + enc . encodeBuffer ( extValue ) + "\n" ) ; } } else sb . append ( ext . toString ( ) ) ; } catch ( Exception e ) { sb . append ( ", Error parsing this extension" ) ; } } } sb . append ( "\n" ) ; return sb . toString ( ) ; }
returns a printable string of this revoked certificate .
