summaryrefslogtreecommitdiffstats
path: root/pki/base/util/test/com/netscape/security/util/StringTestUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/util/test/com/netscape/security/util/StringTestUtil.java')
-rw-r--r--pki/base/util/test/com/netscape/security/util/StringTestUtil.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/pki/base/util/test/com/netscape/security/util/StringTestUtil.java b/pki/base/util/test/com/netscape/security/util/StringTestUtil.java
index 211ba518..06dc10ea 100644
--- a/pki/base/util/test/com/netscape/security/util/StringTestUtil.java
+++ b/pki/base/util/test/com/netscape/security/util/StringTestUtil.java
@@ -7,7 +7,7 @@ import netscape.security.util.DerValue;
public class StringTestUtil {
public final static String PRINTABLE_CHARS =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \'()+,-./:=?";
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 \'()+,-./:=?";
public final static String NON_PRINTABLE_CHARS = "\"\\";
@@ -18,8 +18,9 @@ public class StringTestUtil {
public static String toString(byte[] array) {
StringBuffer sb = new StringBuffer();
- for (int i=0; i<array.length; i++) {
- if (i > 0) sb.append(" ");
+ for (int i = 0; i < array.length; i++) {
+ if (i > 0)
+ sb.append(" ");
sb.append(Integer.toHexString(0xff & array[i] | 0x100).substring(1).toUpperCase());
}
@@ -31,13 +32,14 @@ public class StringTestUtil {
DerValue value = new DerValue(data);
byte[] tmp = value.data.toByteArray();
- if (tmp[0] == -2 && tmp[1] == -1) { // remove optional big-endian byte-order mark
+ if (tmp[0] == -2 && tmp[1] == -1) { // remove optional big-endian
+ // byte-order mark
byte tag = value.tag;
int length = value.length() - 2;
DerOutputStream os = new DerOutputStream();
- os.putTag((byte)0, false, tag);
+ os.putTag((byte) 0, false, tag);
os.putLength(length);
os.write(tmp, 2, length);
@@ -70,7 +72,7 @@ public class StringTestUtil {
case DerValue.tag_UTF8String:
return is.getDerValue().getUTF8String();
default:
- throw new Exception("Unsupported tag: "+tag);
+ throw new Exception("Unsupported tag: " + tag);
}
}
}