1 package org.bouncycastle.asn1.x509;
4 * class for breaking up an X500 Name into it's component tokens, ala
5 * java.util.StringTokenizer. We need this class as some of the
6 * lightweight Java environment don't support classes like
9 public class X509NameTokenizer
13 private StringBuffer buf = new StringBuffer();
15 public X509NameTokenizer(
22 public boolean hasMoreTokens()
24 return (index != oid.length());
27 public String nextToken()
29 if (index == oid.length())
35 boolean quoted = false;
36 boolean escaped = false;
40 while (end != oid.length())
42 char c = oid.charAt(end);
58 if (escaped || quoted)
80 return buf.toString().trim();