diff options
author | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
commit | 32150d3ee32f8ac27118af7c792794b538c78a2f (patch) | |
tree | 52dd96f664a6fa51be25b28b6f10adc5f2c9f660 /pki/base/util/src/netscape/security/util/ExtPrettyPrint.java | |
parent | f05d58a46795553beb8881039cc922974b40db34 (diff) | |
download | pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.gz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.xz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.zip |
Formatting
Formatted project according to eclipse project settings
Diffstat (limited to 'pki/base/util/src/netscape/security/util/ExtPrettyPrint.java')
-rw-r--r-- | pki/base/util/src/netscape/security/util/ExtPrettyPrint.java | 1451 |
1 files changed, 882 insertions, 569 deletions
diff --git a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java index 2e57eac17..d32556efc 100644 --- a/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java +++ b/pki/base/util/src/netscape/security/util/ExtPrettyPrint.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package netscape.security.util; - import java.math.BigInteger; import java.text.DateFormat; import java.util.Enumeration; @@ -78,19 +77,18 @@ import netscape.security.x509.SubjectDirAttributesExtension; import netscape.security.x509.SubjectKeyIdentifierExtension; import netscape.security.x509.UserNotice; - /** - * This class will display the certificate content in predefined - * format. - * + * This class will display the certificate content in predefined format. + * * @author Andrew Wnuk * @version $Revision$, $Date$ */ public class ExtPrettyPrint { - /*========================================================== - * variables - *==========================================================*/ + /* + * ========================================================== variables + * ========================================================== + */ private Extension mExt = null; private ResourceBundle mResource = null; private ResourceBundle resource = null; @@ -99,34 +97,37 @@ public class ExtPrettyPrint { DateFormat dateFormater = null; - /*========================================================== - * constructors - *==========================================================*/ + /* + * ========================================================== constructors + * ========================================================== + */ public ExtPrettyPrint(Extension ext, int indentSize) { mExt = ext; - mResource = ResourceBundle.getBundle(PrettyPrintResources.class.getName()); + mResource = ResourceBundle.getBundle(PrettyPrintResources.class + .getName()); mIndentSize = indentSize; pp = new PrettyPrintFormat(":"); } - /*========================================================== - * public methods - *==========================================================*/ + /* + * ========================================================== public methods + * ========================================================== + */ /** - * This method return string representation of the certificate - * in predefined format using specified client local. I18N Support. - * + * This method return string representation of the certificate in predefined + * format using specified client local. I18N Support. + * * @param clientLocale Locale to be used for localization * @return string representation of the certificate */ - // public String toString(int indentSize) { + // public String toString(int indentSize) { public String toString() { StringBuffer sb = new StringBuffer(); - //check if the extension is known + // check if the extension is known if (mExt instanceof KeyUsageExtension) { return getKeyUsage(); } @@ -220,31 +221,36 @@ public class ExtPrettyPrint { return getCertificatePoliciesExtension(); } - //unknown cert extension + // unknown cert extension try { String extName = OIDMap.getName(mExt.getExtensionId()); if (extName == null) - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER) + - mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER) + + mExt.getExtensionId().toString() + "\n"); else - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER) + " " + extName + " - " + - mExt.getExtensionId().toString() + "\n"); - - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER) + + " " + extName + " - " + + mExt.getExtensionId().toString() + "\n"); + + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); - } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_VALUE) + "\n"); - sb.append(pp.toHexString(mExt.getExtensionValue(), mIndentSize + 8, 16)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); + } + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_VALUE) + + "\n"); + sb.append(pp.toHexString(mExt.getExtensionValue(), mIndentSize + 8, + 16)); return sb.toString(); } catch (Exception e) { return ""; @@ -252,28 +258,33 @@ public class ExtPrettyPrint { } - /*========================================================== - * Private methods - *==========================================================*/ + /* + * ========================================================== Private + * methods========================================================== + */ private String getNSCCommentExtension() { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NSC_COMMENT) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NSC_COMMENT) + + "- " + + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + ((NSCCommentExtension) mExt).toPrint(mIndentSize) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + ((NSCCommentExtension) mExt).toPrint(mIndentSize) + "\n"); return sb.toString(); } catch (Exception e) { return sb.toString(); @@ -284,21 +295,25 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NAME_CONSTRAINTS) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NAME_CONSTRAINTS) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + ((NameConstraintsExtension) mExt).toPrint(mIndentSize + 4)); + sb.append(pp.indent(mIndentSize + 4) + + ((NameConstraintsExtension) mExt) + .toPrint(mIndentSize + 4)); return sb.toString(); } catch (Exception e) { @@ -310,60 +325,66 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_OCSP_NOCHECK) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_OCSP_NOCHECK) + + "- " + + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } return sb.toString(); } catch (Exception e) { return sb.toString(); } - } + } private String getSubjectInfoAccessExtension() { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_SIA) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_SIA) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_ACCESS_DESC) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ACCESS_DESC) + + "\n"); SubjectInfoAccessExtension aia = (SubjectInfoAccessExtension) mExt; for (int i = 0; i < aia.numberOfAccessDescription(); i++) { - AccessDescription ad = (AccessDescription) - aia.getAccessDescription(i); + AccessDescription ad = (AccessDescription) aia + .getAccessDescription(i); ObjectIdentifier method = ad.getMethod(); if (method.equals(SubjectInfoAccessExtension.METHOD_OCSP)) { - sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + ": " + - "ocsp" + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + + ": " + "ocsp" + "\n"); } else { - sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + ": " + - method.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + + ": " + method.toString() + "\n"); } - sb.append(pp.indent(mIndentSize + 8) + "Location #" + i + ": " + - ad.getLocation().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Location #" + i + ": " + + ad.getLocation().toString() + "\n"); } return sb.toString(); } catch (Exception e) { @@ -375,37 +396,40 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_AIA) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_AIA) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_ACCESS_DESC) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ACCESS_DESC) + + "\n"); AuthInfoAccessExtension aia = (AuthInfoAccessExtension) mExt; for (int i = 0; i < aia.numberOfAccessDescription(); i++) { - AccessDescription ad = (AccessDescription) - aia.getAccessDescription(i); + AccessDescription ad = (AccessDescription) aia + .getAccessDescription(i); ObjectIdentifier method = ad.getMethod(); if (method.equals(AuthInfoAccessExtension.METHOD_OCSP)) { - sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + ": " + - "ocsp" + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + + ": " + "ocsp" + "\n"); } else { - sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + ": " + - method.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Method #" + i + + ": " + method.toString() + "\n"); } - sb.append(pp.indent(mIndentSize + 8) + "Location #" + i + ": " + - ad.getLocation().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Location #" + i + ": " + + ad.getLocation().toString() + "\n"); } return sb.toString(); } catch (Exception e) { @@ -417,54 +441,66 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_PRESENCE_SERVER) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_PRESENCE_SERVER) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } PresenceServerExtension pse = (PresenceServerExtension) mExt; - sb.append(pp.indent(mIndentSize + 4) + "Version : " + pse.getVersion() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Street Address : " + pse.getStreetAddress() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Telephone Number : " + pse.getTelephoneNumber() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "RFC822 Name : " + pse.getRFC822() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Version : " + + pse.getVersion() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Street Address : " + + pse.getStreetAddress() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Telephone Number : " + + pse.getTelephoneNumber() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "RFC822 Name : " + + pse.getRFC822() + "\n"); sb.append(pp.indent(mIndentSize + 4) + "ID : " + pse.getID() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Host Name : " + pse.getHostName() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Port Number : " + pse.getPortNumber() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Max Users : " + pse.getMaxUsers() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + "Service Level : " + pse.getServiceLevel() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Host Name : " + + pse.getHostName() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Port Number : " + + pse.getPortNumber() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Max Users : " + + pse.getMaxUsers() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + "Service Level : " + + pse.getServiceLevel() + "\n"); return sb.toString(); } catch (Exception e) { return sb.toString(); } - } + } private String getPrivateKeyUsageExtension() { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_PRIVATE_KEY_USAGE) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_PRIVATE_KEY_USAGE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } PrivateKeyUsageExtension usage = (PrivateKeyUsageExtension) mExt; @@ -477,34 +513,40 @@ public class ExtPrettyPrint { String notBefore = dateFormater.format(usage.getNotBefore()); String notAfter = dateFormater.format(usage.getNotAfter()); - sb.append(pp.indent(mIndentSize + 8) + "Not Before: " + notBefore + "\n"); - sb.append(pp.indent(mIndentSize + 8) + "Not After: " + notAfter + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Not Before: " + notBefore + + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "Not After: " + notAfter + + "\n"); return sb.toString(); } catch (Exception e) { return sb.toString(); } - } + } private String getExtendedKeyUsageExtension() { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_EXTENDED_KEY_USAGE) + + "\n"); ExtendedKeyUsageExtension usage = (ExtendedKeyUsageExtension) mExt; Enumeration e = usage.getOIDs(); @@ -513,9 +555,11 @@ public class ExtPrettyPrint { ObjectIdentifier oid = (ObjectIdentifier) e.nextElement(); if (oid.equals(ExtendedKeyUsageExtension.OID_OCSP_SIGNING)) { - sb.append(pp.indent(mIndentSize + 8) + "OCSPSigning" + "\n"); + sb.append(pp.indent(mIndentSize + 8) + "OCSPSigning" + + "\n"); } else { - sb.append(pp.indent(mIndentSize + 8) + oid.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + oid.toString() + + "\n"); } } } @@ -532,49 +576,82 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_KEY_USAGE) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_KEY_USAGE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_KEY_USAGE) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_KEY_USAGE) + + "\n"); KeyUsageExtension usage = (KeyUsageExtension) mExt; - if (((Boolean) usage.get(KeyUsageExtension.DIGITAL_SIGNATURE)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.DIGITAL_SIGNATURE) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.NON_REPUDIATION)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.NON_REPUDIATION) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.KEY_ENCIPHERMENT)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.KEY_ENCIPHERMENT) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.DATA_ENCIPHERMENT)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.DATA_ENCIPHERMENT) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.KEY_AGREEMENT)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.KEY_AGREEMENT) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.KEY_CERTSIGN)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.KEY_CERTSIGN) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.CRL_SIGN)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.CRL_SIGN) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.ENCIPHER_ONLY)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.ENCIPHER_ONLY) + "\n"); - } - if (((Boolean) usage.get(KeyUsageExtension.DECIPHER_ONLY)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(KeyUsageExtension.DECIPHER_ONLY) + "\n"); + if (((Boolean) usage.get(KeyUsageExtension.DIGITAL_SIGNATURE)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(KeyUsageExtension.DIGITAL_SIGNATURE) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.NON_REPUDIATION)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(KeyUsageExtension.NON_REPUDIATION) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.KEY_ENCIPHERMENT)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(KeyUsageExtension.KEY_ENCIPHERMENT) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.DATA_ENCIPHERMENT)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(KeyUsageExtension.DATA_ENCIPHERMENT) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.KEY_AGREEMENT)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(KeyUsageExtension.KEY_AGREEMENT) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.KEY_CERTSIGN)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(KeyUsageExtension.KEY_CERTSIGN) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.CRL_SIGN)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(KeyUsageExtension.CRL_SIGN) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.ENCIPHER_ONLY)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(KeyUsageExtension.ENCIPHER_ONLY) + + "\n"); + } + if (((Boolean) usage.get(KeyUsageExtension.DECIPHER_ONLY)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(KeyUsageExtension.DECIPHER_ONLY) + + "\n"); } return sb.toString(); } catch (Exception e) { @@ -590,37 +667,66 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_TYPE) + "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_TYPE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CERT_USAGE) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_CERT_USAGE) + + "\n"); NSCertTypeExtension type = (NSCertTypeExtension) mExt; - if (((Boolean) type.get(NSCertTypeExtension.SSL_CLIENT)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.SSL_CLIENT) + "\n"); + if (((Boolean) type.get(NSCertTypeExtension.SSL_CLIENT)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(NSCertTypeExtension.SSL_CLIENT) + + "\n"); } - if (((Boolean) type.get(NSCertTypeExtension.SSL_SERVER)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.SSL_SERVER) + "\n"); + if (((Boolean) type.get(NSCertTypeExtension.SSL_SERVER)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(NSCertTypeExtension.SSL_SERVER) + + "\n"); } if (((Boolean) type.get(NSCertTypeExtension.EMAIL)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.EMAIL) + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(NSCertTypeExtension.EMAIL) + "\n"); } - if (((Boolean) type.get(NSCertTypeExtension.OBJECT_SIGNING)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.OBJECT_SIGNING) + "\n"); + if (((Boolean) type.get(NSCertTypeExtension.OBJECT_SIGNING)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(NSCertTypeExtension.OBJECT_SIGNING) + + "\n"); } if (((Boolean) type.get(NSCertTypeExtension.SSL_CA)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.SSL_CA) + "\n"); - } - if (((Boolean) type.get(NSCertTypeExtension.EMAIL_CA)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.EMAIL_CA) + "\n"); - } - if (((Boolean) type.get(NSCertTypeExtension.OBJECT_SIGNING_CA)).booleanValue()) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(NSCertTypeExtension.OBJECT_SIGNING_CA) + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(NSCertTypeExtension.SSL_CA) + + "\n"); + } + if (((Boolean) type.get(NSCertTypeExtension.EMAIL_CA)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource.getString(NSCertTypeExtension.EMAIL_CA) + + "\n"); + } + if (((Boolean) type.get(NSCertTypeExtension.OBJECT_SIGNING_CA)) + .booleanValue()) { + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(NSCertTypeExtension.OBJECT_SIGNING_CA) + + "\n"); } return sb.toString(); } catch (Exception e) { @@ -636,19 +742,29 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_SKI) + "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_SKI) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } SubjectKeyIdentifierExtension id = (SubjectKeyIdentifierExtension) mExt; - KeyIdentifier keyId = (KeyIdentifier) id.get(SubjectKeyIdentifierExtension.KEY_ID); + KeyIdentifier keyId = (KeyIdentifier) id + .get(SubjectKeyIdentifierExtension.KEY_ID); if (keyId != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_KEY_ID) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_KEY_ID) + + "\n"); sb.append(pp.toHexString(keyId.getIdentifier(), 24, 16)); } return sb.toString(); @@ -664,39 +780,59 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_AKI) + "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_AKI) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } AuthorityKeyIdentifierExtension id = (AuthorityKeyIdentifierExtension) mExt; - KeyIdentifier keyId = (KeyIdentifier) id.get(AuthorityKeyIdentifierExtension.KEY_ID); + KeyIdentifier keyId = (KeyIdentifier) id + .get(AuthorityKeyIdentifierExtension.KEY_ID); if (keyId != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_KEY_ID) + "\n"); - sb.append(pp.toHexString(keyId.getIdentifier(), mIndentSize + 8, 16)); - // sb.append(pp.toHexString(keyId.getIdentifier(),24,16)); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_KEY_ID) + + "\n"); + sb.append(pp.toHexString(keyId.getIdentifier(), + mIndentSize + 8, 16)); + // sb.append(pp.toHexString(keyId.getIdentifier(),24,16)); } - GeneralNames authNames = (GeneralNames) id.get(AuthorityKeyIdentifierExtension.AUTH_NAME); + GeneralNames authNames = (GeneralNames) id + .get(AuthorityKeyIdentifierExtension.AUTH_NAME); if (authNames != null) { for (int i = 0; i < authNames.size(); i++) { GeneralName authName = (GeneralName) authNames.elementAt(i); if (authName != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_AUTH_NAME) + authName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_AUTH_NAME) + + authName.toString() + "\n"); } } } - SerialNumber serial = (SerialNumber) id.get(AuthorityKeyIdentifierExtension.SERIAL_NUMBER); + SerialNumber serial = (SerialNumber) id + .get(AuthorityKeyIdentifierExtension.SERIAL_NUMBER); if (serial != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_SERIAL) + - "0x" + serial.getNumber().toBigInteger().toString(16).toUpperCase() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_SERIAL) + + "0x" + + serial.getNumber().toBigInteger().toString(16) + .toUpperCase() + "\n"); } return sb.toString(); } catch (Exception e) { @@ -711,19 +847,26 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_REVOCATION_REASON) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_REVOCATION_REASON) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); CRLReasonExtension ext = (CRLReasonExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_REASON) + - ext.getReason().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_REASON) + + ext.getReason().toString() + "\n"); return sb.toString(); } catch (Exception e) { @@ -737,24 +880,26 @@ public class ExtPrettyPrint { private String getInhibitAnyPolicyExtension() { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + - mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_INHIBIT_ANY_POLICY_EXT) + "- "+ - mExt.getExtensionId().toString() +"\n"); - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); - InhibitAnyPolicyExtension ext = (InhibitAnyPolicyExtension)mExt; + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_INHIBIT_ANY_POLICY_EXT) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + InhibitAnyPolicyExtension ext = (InhibitAnyPolicyExtension) mExt; if (((Extension) mExt).isCritical()) - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); else - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_SKIP_CERTS)); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_SKIP_CERTS)); BigInt num = ext.getSkipCerts(); - sb.append(""+num.toInt() + "\n"); + sb.append("" + num.toInt() + "\n"); return sb.toString(); } catch (Exception e) { return ""; @@ -768,38 +913,59 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_BASIC_CONSTRAINTS) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_BASIC_CONSTRAINTS) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); BasicConstraintsExtension ext = (BasicConstraintsExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_IS_CA)); - boolean isCA = ((Boolean) ext.get(BasicConstraintsExtension.IS_CA)).booleanValue(); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_IS_CA)); + boolean isCA = ((Boolean) ext.get(BasicConstraintsExtension.IS_CA)) + .booleanValue(); if (isCA) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - Integer pathLength = (Integer) ext.get(BasicConstraintsExtension.PATH_LEN); + Integer pathLength = (Integer) ext + .get(BasicConstraintsExtension.PATH_LEN); if (pathLength != null) { if (pathLength.longValue() >= 0) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_PATH_LEN) + - pathLength.toString() + "\n"); - } else if (pathLength.longValue() == -1 || pathLength.longValue() == -2) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_PATH_LEN) + - mResource.getString(PrettyPrintResources.TOKEN_PATH_LEN_UNLIMITED) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_PATH_LEN) + + pathLength.toString() + "\n"); + } else if (pathLength.longValue() == -1 + || pathLength.longValue() == -2) { + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_PATH_LEN) + + mResource + .getString(PrettyPrintResources.TOKEN_PATH_LEN_UNLIMITED) + + "\n"); } else { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_PATH_LEN) + - mResource.getString(PrettyPrintResources.TOKEN_PATH_LEN_INVALID) + - " (" + pathLength.toString() + ")\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_PATH_LEN) + + mResource + .getString(PrettyPrintResources.TOKEN_PATH_LEN_INVALID) + + " (" + pathLength.toString() + ")\n"); } } @@ -816,23 +982,32 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_CRL_NUMBER) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_CRL_NUMBER) + + "- " + + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); CRLNumberExtension ext = (CRLNumberExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - BigInteger crlNumber = (BigInteger) ext.get(CRLNumberExtension.NUMBER); + BigInteger crlNumber = (BigInteger) ext + .get(CRLNumberExtension.NUMBER); if (crlNumber != null) { - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_NUMBER) + - crlNumber.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_NUMBER) + + crlNumber.toString() + "\n"); } return sb.toString(); @@ -848,23 +1023,31 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_DELTA_CRL_INDICATOR) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_DELTA_CRL_INDICATOR) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); DeltaCRLIndicatorExtension ext = (DeltaCRLIndicatorExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - BigInteger crlNumber = (BigInteger) ext.get(DeltaCRLIndicatorExtension.NUMBER); + BigInteger crlNumber = (BigInteger) ext + .get(DeltaCRLIndicatorExtension.NUMBER); if (crlNumber != null) { - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_BASE_CRL_NUMBER) + - crlNumber.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_BASE_CRL_NUMBER) + + crlNumber.toString() + "\n"); } return sb.toString(); @@ -880,32 +1063,43 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_ISSUER_ALT_NAME) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_ISSUER_ALT_NAME) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); IssuerAlternativeNameExtension ext = (IssuerAlternativeNameExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - GeneralNames issuerNames = (GeneralNames) ext.get(IssuerAlternativeNameExtension.ISSUER_NAME); + GeneralNames issuerNames = (GeneralNames) ext + .get(IssuerAlternativeNameExtension.ISSUER_NAME); if (issuerNames != null) { - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_ISSUER_NAMES) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ISSUER_NAMES) + + "\n"); for (int i = 0; i < issuerNames.size(); i++) { - GeneralName issuerName = (GeneralName) issuerNames.elementAt(i); + GeneralName issuerName = (GeneralName) issuerNames + .elementAt(i); if (issuerName != null) { String nameType = ""; if (issuerName.getType() == GeneralNameInterface.NAME_DIRECTORY) nameType = "DirectoryName: "; - sb.append(pp.indent(mIndentSize + 8) + nameType + issuerName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + nameType + + issuerName.toString() + "\n"); } } } @@ -923,30 +1117,41 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_SUBJECT_ALT_NAME) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_SUBJECT_ALT_NAME) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); SubjectAlternativeNameExtension ext = (SubjectAlternativeNameExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - GeneralNames subjectNames = (GeneralNames) ext.get(SubjectAlternativeNameExtension.SUBJECT_NAME); + GeneralNames subjectNames = (GeneralNames) ext + .get(SubjectAlternativeNameExtension.SUBJECT_NAME); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_VALUE) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_VALUE) + + "\n"); for (int i = 0; i < subjectNames.size(); i++) { - GeneralName subjectName = (GeneralName) subjectNames.elementAt(i); + GeneralName subjectName = (GeneralName) subjectNames + .elementAt(i); if (subjectName != null) { String nameType = ""; if (subjectName.getType() == GeneralNameInterface.NAME_DIRECTORY) nameType = "DirectoryName: "; - sb.append(pp.indent(mIndentSize + 8) + nameType + subjectName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + nameType + + subjectName.toString() + "\n"); } } @@ -963,24 +1168,33 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_SCOPE_OF_USE) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_CERT_SCOPE_OF_USE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); CertificateScopeOfUseExtension ext = (CertificateScopeOfUseExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } Vector entries = ext.getCertificateScopeEntries(); if (entries != null) { - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_SCOPE_OF_USE) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_SCOPE_OF_USE) + + "\n"); for (int i = 0; i < entries.size(); i++) { - CertificateScopeEntry se = (CertificateScopeEntry) entries.elementAt(i); + CertificateScopeEntry se = (CertificateScopeEntry) entries + .elementAt(i); GeneralName gn = se.getGeneralName(); if (gn != null) { @@ -988,13 +1202,15 @@ public class ExtPrettyPrint { if (gn.getType() == GeneralNameInterface.NAME_DIRECTORY) nameType = "DirectoryName: "; - sb.append(pp.indent(mIndentSize + 8) + nameType + gn.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + nameType + + gn.toString() + "\n"); } BigInt port = se.getPort(); if (port != null) { - sb.append(pp.indent(mIndentSize + 8) + PrettyPrintResources.TOKEN_PORT + - port.toBigInteger().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + PrettyPrintResources.TOKEN_PORT + + port.toBigInteger().toString() + "\n"); } } } @@ -1015,19 +1231,20 @@ public class ExtPrettyPrint { // // Generic stuff: name, OID, criticality // - sb.append(pp.indent(mIndentSize) + - mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_FRESHEST_CRL_EXT) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_FRESHEST_CRL_EXT) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } // @@ -1037,9 +1254,10 @@ public class ExtPrettyPrint { int numPoints = ext.getNumPoints(); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRLDP_NUMPOINTS) - + numPoints + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_NUMPOINTS) + + numPoints + "\n"); for (int i = 0; i < numPoints; i++) { @@ -1052,9 +1270,10 @@ public class ExtPrettyPrint { idt = mIndentSize + 4; // reset each time through loop boolean isEmpty = true; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_POINTN) + - i + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_POINTN) + + i + "\n"); CRLDistributionPoint pt = ext.getPointAt(i); @@ -1062,16 +1281,18 @@ public class ExtPrettyPrint { if (pt.getFullName() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) - + pt.getFullName() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) + + pt.getFullName() + "\n"); } if (pt.getRelativeName() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) - + pt.getRelativeName() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) + + pt.getRelativeName() + "\n"); } if (pt.getReasons() != null) { @@ -1079,16 +1300,18 @@ public class ExtPrettyPrint { byte[] reasonBits = pt.getReasons().toByteArray(); String reasonList = reasonBitsToReasonList(reasonBits); - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_REASONS) - + reasonList + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_REASONS) + + reasonList + "\n"); } - + if (pt.getCRLIssuer() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_CRLISSUER) - + pt.getCRLIssuer() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_CRLISSUER) + + pt.getCRLIssuer() + "\n"); } if (isEmpty) { @@ -1114,32 +1337,34 @@ public class ExtPrettyPrint { // // Generic stuff: name, OID, criticality // - sb.append(pp.indent(mIndentSize) + - mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_CRL_DP_EXT) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_CRL_DP_EXT) + + "- " + + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } // // Now the CRLDP-specific stuff // - CRLDistributionPointsExtension ext = - (CRLDistributionPointsExtension) mExt; + CRLDistributionPointsExtension ext = (CRLDistributionPointsExtension) mExt; int numPoints = ext.getNumPoints(); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRLDP_NUMPOINTS) - + numPoints + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_NUMPOINTS) + + numPoints + "\n"); for (int i = 0; i < numPoints; i++) { @@ -1152,9 +1377,10 @@ public class ExtPrettyPrint { idt = mIndentSize + 4; // reset each time through loop boolean isEmpty = true; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_POINTN) + - i + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_POINTN) + + i + "\n"); CRLDistributionPoint pt = ext.getPointAt(i); @@ -1162,16 +1388,18 @@ public class ExtPrettyPrint { if (pt.getFullName() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) - + pt.getFullName() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) + + pt.getFullName() + "\n"); } if (pt.getRelativeName() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) - + pt.getRelativeName() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_DISTPOINT) + + pt.getRelativeName() + "\n"); } if (pt.getReasons() != null) { @@ -1179,16 +1407,18 @@ public class ExtPrettyPrint { byte[] reasonBits = pt.getReasons().toByteArray(); String reasonList = reasonBitsToReasonList(reasonBits); - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_REASONS) - + reasonList + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_REASONS) + + reasonList + "\n"); } - + if (pt.getCRLIssuer() != null) { isEmpty = false; - sb.append(pp.indent(idt) + - mResource.getString(PrettyPrintResources.TOKEN_CRLDP_CRLISSUER) - + pt.getCRLIssuer() + "\n"); + sb.append(pp.indent(idt) + + mResource + .getString(PrettyPrintResources.TOKEN_CRLDP_CRLISSUER) + + pt.getCRLIssuer() + "\n"); } if (isEmpty) { @@ -1228,66 +1458,99 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString(PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_ISSUING_DIST_POINT) + "- " + - mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_ISSUING_DIST_POINT) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } IssuingDistributionPointExtension ext = (IssuingDistributionPointExtension) mExt; - IssuingDistributionPoint issuingDistributionPoint = ext.getIssuingDistributionPoint(); + IssuingDistributionPoint issuingDistributionPoint = ext + .getIssuingDistributionPoint(); if (issuingDistributionPoint != null) { GeneralNames fullNames = issuingDistributionPoint.getFullName(); RDN relativeName = issuingDistributionPoint.getRelativeName(); if (fullNames != null || relativeName != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_DIST_POINT_NAME) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_DIST_POINT_NAME) + + "\n"); if (fullNames != null) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(PrettyPrintResources.TOKEN_FULL_NAME) + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(PrettyPrintResources.TOKEN_FULL_NAME) + + "\n"); for (int i = 0; i < fullNames.size(); i++) { - GeneralName fullName = (GeneralName) fullNames.elementAt(i); + GeneralName fullName = (GeneralName) fullNames + .elementAt(i); if (fullName != null) { - sb.append(pp.indent(mIndentSize + 12) + fullName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 12) + + fullName.toString() + "\n"); } } } if (relativeName != null) { - sb.append(pp.indent(mIndentSize + 8) + mResource.getString(PrettyPrintResources.TOKEN_RELATIVE_NAME) + - relativeName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(PrettyPrintResources.TOKEN_RELATIVE_NAME) + + relativeName.toString() + "\n"); } } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_ONLY_USER_CERTS)); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ONLY_USER_CERTS)); if (issuingDistributionPoint.getOnlyContainsUserCerts()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_YES) + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NO) + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_ONLY_CA_CERTS)); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ONLY_CA_CERTS)); if (issuingDistributionPoint.getOnlyContainsCACerts()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_YES) + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NO) + "\n"); } - BitArray onlySomeReasons = issuingDistributionPoint.getOnlySomeReasons(); + BitArray onlySomeReasons = issuingDistributionPoint + .getOnlySomeReasons(); if (onlySomeReasons != null) { - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_ONLY_SOME_REASONS)); - sb.append("0x" + pp.toHexString(onlySomeReasons.toByteArray())); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ONLY_SOME_REASONS)); + sb.append("0x" + + pp.toHexString(onlySomeReasons.toByteArray())); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString(PrettyPrintResources.TOKEN_INDIRECT_CRL)); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_INDIRECT_CRL)); if (issuingDistributionPoint.getIndirectCRL()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_YES) + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NO) + "\n"); } } @@ -1304,24 +1567,29 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_INVALIDITY_DATE) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_INVALIDITY_DATE) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); InvalidityDateExtension ext = (InvalidityDateExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_DATE_OF_INVALIDITY) + - ext.getInvalidityDate().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_DATE_OF_INVALIDITY) + + ext.getInvalidityDate().toString() + "\n"); return sb.toString(); - } catch (Exception e) { + } catch (Exception e) { return ""; } } @@ -1333,35 +1601,43 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERTIFICATE_ISSUER) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_CERTIFICATE_ISSUER) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); CertificateIssuerExtension ext = (CertificateIssuerExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - GeneralNames issuerNames = (GeneralNames) ext.get( - CertificateIssuerExtension.CERTIFICATE_ISSUER); + GeneralNames issuerNames = (GeneralNames) ext + .get(CertificateIssuerExtension.CERTIFICATE_ISSUER); if (issuerNames != null) { - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_ISSUER_NAMES) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ISSUER_NAMES) + + "\n"); for (int i = 0; i < issuerNames.size(); i++) { - GeneralName issuerName = (GeneralName) issuerNames.elementAt(i); + GeneralName issuerName = (GeneralName) issuerNames + .elementAt(i); if (issuerName != null) { String nameType = ""; if (issuerName.getType() == GeneralNameInterface.NAME_DIRECTORY) nameType = "DirectoryName: "; - sb.append(pp.indent(mIndentSize + 8) + nameType + issuerName.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + nameType + + issuerName.toString() + "\n"); } } } @@ -1379,24 +1655,29 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_HOLD_INSTRUCTION) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_HOLD_INSTRUCTION) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); HoldInstructionExtension ext = (HoldInstructionExtension) mExt; if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_HOLD_INSTRUCTION_CODE) + - ext.getHoldInstructionCodeDescription() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_HOLD_INSTRUCTION_CODE) + + ext.getHoldInstructionCodeDescription() + "\n"); return sb.toString(); - } catch (Exception e) { + } catch (Exception e) { return ""; } } @@ -1408,38 +1689,38 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append( - mResource.getString( - PrettyPrintResources.TOKEN_POLICY_CONSTRAINTS) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_POLICY_CONSTRAINTS) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } PolicyConstraintsExtension ext = (PolicyConstraintsExtension) mExt; int require = ext.getRequireExplicitMapping(); int inhibit = ext.getInhibitPolicyMapping(); - sb.append( - pp.indent(mIndentSize + 4) + - mResource.getString( - PrettyPrintResources.TOKEN_REQUIRE_EXPLICIT_POLICY) + - ((require == -1) ? - mResource.getString(PrettyPrintResources.TOKEN_NOT_SET) : - String.valueOf(require)) + "\n"); - sb.append( - pp.indent(mIndentSize + 4) + - mResource.getString( - PrettyPrintResources.TOKEN_INHIBIT_POLICY_MAPPING) + - ((inhibit == -1) ? - mResource.getString(PrettyPrintResources.TOKEN_NOT_SET) : - String.valueOf(inhibit)) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_REQUIRE_EXPLICIT_POLICY) + + ((require == -1) ? mResource + .getString(PrettyPrintResources.TOKEN_NOT_SET) + : String.valueOf(require)) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_INHIBIT_POLICY_MAPPING) + + ((inhibit == -1) ? mResource + .getString(PrettyPrintResources.TOKEN_NOT_SET) + : String.valueOf(inhibit)) + "\n"); return sb.toString(); } catch (Exception e) { return ""; @@ -1453,43 +1734,50 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_POLICY_MAPPINGS) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_POLICY_MAPPINGS) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } PolicyMappingsExtension ext = (PolicyMappingsExtension) mExt; Enumeration maps = ext.getMappings(); - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_MAPPINGS)); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_MAPPINGS)); if (maps == null || !maps.hasMoreElements()) { - sb.append( - mResource.getString(PrettyPrintResources.TOKEN_NONE) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NONE) + + "\n"); } else { sb.append("\n"); for (int i = 0; maps.hasMoreElements(); i++) { - sb.append(pp.indent(mIndentSize + 8) + - mResource.getString( - PrettyPrintResources.TOKEN_MAP) + i + ":" + "\n"); - CertificatePolicyMap m = - (CertificatePolicyMap) maps.nextElement(); - - sb.append(pp.indent(mIndentSize + 12) + - mResource.getString( - PrettyPrintResources.TOKEN_ISSUER_DOMAIN_POLICY) + - m.getIssuerIdentifier().getIdentifier().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 12) + - mResource.getString( - PrettyPrintResources.TOKEN_SUBJECT_DOMAIN_POLICY) + - m.getSubjectIdentifier().getIdentifier().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(PrettyPrintResources.TOKEN_MAP) + + i + ":" + "\n"); + CertificatePolicyMap m = (CertificatePolicyMap) maps + .nextElement(); + + sb.append(pp.indent(mIndentSize + 12) + + mResource + .getString(PrettyPrintResources.TOKEN_ISSUER_DOMAIN_POLICY) + + m.getIssuerIdentifier().getIdentifier() + .toString() + "\n"); + sb.append(pp.indent(mIndentSize + 12) + + mResource + .getString(PrettyPrintResources.TOKEN_SUBJECT_DOMAIN_POLICY) + + m.getSubjectIdentifier().getIdentifier() + .toString() + "\n"); } } return sb.toString(); @@ -1505,53 +1793,59 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_SUBJECT_DIR_ATTR) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_SUBJECT_DIR_ATTR) + + "- " + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (((Extension) mExt).isCritical()) { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - SubjectDirAttributesExtension ext = - (SubjectDirAttributesExtension) mExt; + SubjectDirAttributesExtension ext = (SubjectDirAttributesExtension) mExt; - sb.append(pp.indent(mIndentSize + 4) + - mResource.getString(PrettyPrintResources.TOKEN_ATTRIBUTES)); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_ATTRIBUTES)); Enumeration attrs = ext.getAttributesList(); if (attrs == null || !attrs.hasMoreElements()) { - sb.append( - mResource.getString(PrettyPrintResources.TOKEN_NONE) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NONE) + + "\n"); } else { sb.append("\n"); for (int j = 0; attrs.hasMoreElements(); j++) { Attribute attr = (Attribute) attrs.nextElement(); - sb.append(pp.indent(mIndentSize + 8) + - mResource.getString( - PrettyPrintResources.TOKEN_ATTRIBUTE) + j + ":" + "\n"); - sb.append(pp.indent(mIndentSize + 12) + - mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER) + - attr.getOid().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 12) + - mResource.getString( - PrettyPrintResources.TOKEN_VALUES)); + sb.append(pp.indent(mIndentSize + 8) + + mResource + .getString(PrettyPrintResources.TOKEN_ATTRIBUTE) + + j + ":" + "\n"); + sb.append(pp.indent(mIndentSize + 12) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER) + + attr.getOid().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 12) + + mResource + .getString(PrettyPrintResources.TOKEN_VALUES)); Enumeration values = attr.getValues(); if (values == null || !values.hasMoreElements()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NONE) + "\n"); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_NONE) + + "\n"); } else { for (int k = 0; values.hasMoreElements(); k++) { String v = (String) values.nextElement(); - if (k != 0) + if (k != 0) sb.append(","); sb.append(v); } @@ -1569,51 +1863,70 @@ public class ExtPrettyPrint { StringBuffer sb = new StringBuffer(); try { - sb.append(pp.indent(mIndentSize) + mResource.getString( - PrettyPrintResources.TOKEN_IDENTIFIER)); - sb.append(mResource.getString(PrettyPrintResources.TOKEN_CERT_POLICIES) + - "- " + mExt.getExtensionId().toString() + "\n"); - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CRITICAL)); + sb.append(pp.indent(mIndentSize) + + mResource + .getString(PrettyPrintResources.TOKEN_IDENTIFIER)); + sb.append(mResource + .getString(PrettyPrintResources.TOKEN_CERT_POLICIES) + + "- " + + mExt.getExtensionId().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource.getString(PrettyPrintResources.TOKEN_CRITICAL)); if (mExt.isCritical()) { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_YES) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_YES) + + "\n"); } else { - sb.append(mResource.getString( - PrettyPrintResources.TOKEN_NO) + "\n"); + sb.append(mResource.getString(PrettyPrintResources.TOKEN_NO) + + "\n"); } - sb.append(pp.indent(mIndentSize + 4) + mResource.getString( - PrettyPrintResources.TOKEN_CERT_POLICIES) + "\n"); + sb.append(pp.indent(mIndentSize + 4) + + mResource + .getString(PrettyPrintResources.TOKEN_CERT_POLICIES) + + "\n"); CertificatePoliciesExtension cp = (CertificatePoliciesExtension) mExt; Vector cpv = (Vector) cp.get("infos"); Enumeration e = cpv.elements(); if (e != null) { while (e.hasMoreElements()) { - CertificatePolicyInfo cpi = (CertificatePolicyInfo) e.nextElement(); + CertificatePolicyInfo cpi = (CertificatePolicyInfo) e + .nextElement(); - sb.append(pp.indent(mIndentSize + 8) + "Policy Identifier: " + cpi.getPolicyIdentifier().getIdentifier().toString() + "\n"); + sb.append(pp.indent(mIndentSize + 8) + + "Policy Identifier: " + + cpi.getPolicyIdentifier().getIdentifier() + .toString() + "\n"); PolicyQualifiers cpq = cpi.getPolicyQualifiers(); if (cpq != null) { - for (int i=0; i < cpq.size(); i++) { + for (int i = 0; i < cpq.size(); i++) { PolicyQualifierInfo pq = cpq.getInfoAt(i); Qualifier q = pq.getQualifier(); if (q instanceof CPSuri) { - sb.append(pp.indent(mIndentSize + 12) + "Policy Qualifier Identifier: CPS Pointer Qualifier - " - + pq.getId() + "\n"); - sb.append(pp.indent(mIndentSize + 12) + "Policy Qualifier Data: " + ((CPSuri) q).getURI() + "\n"); - } - else if (q instanceof UserNotice) { - sb.append(pp.indent(mIndentSize + 12) + "Policy Qualifier Identifier: CPS User Notice Qualifier - " - + pq.getId() + "\n"); - NoticeReference nref = ((UserNotice) q).getNoticeReference(); - DisplayText dt = ((UserNotice) q).getDisplayText(); - sb.append(pp.indent(mIndentSize +12) + "Policy Qualifier Data: \n"); - if (nref != null) { - sb.append(pp.indent(mIndentSize+16) + "Organization: " + nref.getOrganization().toString() + "\n" ); - sb.append(pp.indent(mIndentSize+16) + "Notice Numbers: " ); + sb.append(pp.indent(mIndentSize + 12) + + "Policy Qualifier Identifier: CPS Pointer Qualifier - " + + pq.getId() + "\n"); + sb.append(pp.indent(mIndentSize + 12) + + "Policy Qualifier Data: " + + ((CPSuri) q).getURI() + "\n"); + } else if (q instanceof UserNotice) { + sb.append(pp.indent(mIndentSize + 12) + + "Policy Qualifier Identifier: CPS User Notice Qualifier - " + + pq.getId() + "\n"); + NoticeReference nref = ((UserNotice) q) + .getNoticeReference(); + DisplayText dt = ((UserNotice) q) + .getDisplayText(); + sb.append(pp.indent(mIndentSize + 12) + + "Policy Qualifier Data: \n"); + if (nref != null) { + sb.append(pp.indent(mIndentSize + 16) + + "Organization: " + + nref.getOrganization().toString() + + "\n"); + sb.append(pp.indent(mIndentSize + 16) + + "Notice Numbers: "); int[] nums = nref.getNumbers(); - for (int k=0; k<nums.length; k++) { + for (int k = 0; k < nums.length; k++) { if (k != 0) { sb.append(","); sb.append(nums[k]); @@ -1624,9 +1937,11 @@ public class ExtPrettyPrint { sb.append("\n"); } if (dt != null) { - sb.append(pp.indent(mIndentSize+16) + "Explicit Text: " + dt.toString() + "\n"); + sb.append(pp.indent(mIndentSize + 16) + + "Explicit Text: " + dt.toString() + + "\n"); } - } + } } } } @@ -1637,6 +1952,4 @@ public class ExtPrettyPrint { } } - } - |