FileDocCategorySizeDatePackage
OIDTokenizer.javaAPI DocAzureus 3.0.3.4925Tue Jun 08 05:12:56 BST 2004org.bouncycastle.asn1

OIDTokenizer

public class OIDTokenizer extends Object
class for breaking up an OID into it's component tokens, ala java.util.StringTokenizer. We need this class as some of the lightweight Java environment don't support classes like StringTokenizer.

Fields Summary
private String
oid
private int
index
Constructors Summary
public OIDTokenizer(String oid)

        this.oid = oid;
        this.index = 0;
    
Methods Summary
public booleanhasMoreTokens()

        return (index != -1);
    
public java.lang.StringnextToken()

        if (index == -1)
        {
            return null;
        }

        String  token;
        int     end = oid.indexOf('.", index);

        if (end == -1)
        {
            token = oid.substring(index);
            index = -1;
            return token;
        }

        token = oid.substring(index, end);

        index = end + 1;
        return token;