1
package org.bouncycastle.asn1.x500.style;
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
class X500NameTokenizer
13
private char seperator;
14
private StringBuffer buf = new StringBuffer();
16
public X500NameTokenizer(
22
public X500NameTokenizer(
28
this.seperator = seperator;
31
public boolean hasMoreTokens()
33
return (index != value.length());
36
public String nextToken()
38
if (index == value.length())
44
boolean quoted = false;
45
boolean escaped = false;
49
while (end != value.length())
51
char c = value.charAt(end);
67
if (escaped || quoted)
69
if (c == '#' && buf.charAt(buf.length() - 1) == '=')
73
else if (c == '+' && seperator != '+')
84
else if (c == seperator)
97
return buf.toString().trim();