All LDAP Classes
Internal LDAP Classes

com.novell.sasl.client
Class TokenParser

java.lang.Object
  extended bycom.novell.sasl.client.TokenParser

class TokenParser
extends java.lang.Object

The TokenParser class will parse individual tokens from a list of tokens that are a directive value for a DigestMD5 authentication.The tokens are separated commas.


Field Summary
private  int m_curPos
           
private  int m_scanStart
           
private  int m_state
           
private  java.lang.String m_tokens
           
private static int STATE_DONE
           
private static int STATE_LOOKING_FOR_COMMA
           
private static int STATE_LOOKING_FOR_FIRST_TOKEN
           
private static int STATE_LOOKING_FOR_TOKEN
           
private static int STATE_PARSING_ERROR
           
private static int STATE_SCANNING_TOKEN
           
 
Constructor Summary
(package private) TokenParser(java.lang.String tokens)
           
 
Method Summary
(package private)  boolean isValidTokenChar(char c)
          This function returns TRUE if the character is a valid token character.
(package private)  boolean isWhiteSpace(char c)
          This function returns TRUE if the character is linear white space (LWS).
(package private)  java.lang.String parseToken()
          This function parses the next token from the tokens string and returns it as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE_LOOKING_FOR_FIRST_TOKEN

private static final int STATE_LOOKING_FOR_FIRST_TOKEN
See Also:
Constant Field Values

STATE_LOOKING_FOR_TOKEN

private static final int STATE_LOOKING_FOR_TOKEN
See Also:
Constant Field Values

STATE_SCANNING_TOKEN

private static final int STATE_SCANNING_TOKEN
See Also:
Constant Field Values

STATE_LOOKING_FOR_COMMA

private static final int STATE_LOOKING_FOR_COMMA
See Also:
Constant Field Values

STATE_PARSING_ERROR

private static final int STATE_PARSING_ERROR
See Also:
Constant Field Values

STATE_DONE

private static final int STATE_DONE
See Also:
Constant Field Values

m_curPos

private int m_curPos

m_scanStart

private int m_scanStart

m_state

private int m_state

m_tokens

private java.lang.String m_tokens
Constructor Detail

TokenParser

TokenParser(java.lang.String tokens)
Method Detail

parseToken

java.lang.String parseToken()
                      throws SaslException
This function parses the next token from the tokens string and returns it as a string. If there are no more tokens a null reference is returned.

Returns:
the parsed token or a null reference if there are no more tokens
Throws:
SASLException - if an error occurs while parsing
SaslException

isValidTokenChar

boolean isValidTokenChar(char c)
This function returns TRUE if the character is a valid token character. token = 1* separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT CTL = CHAR =

Parameters:
c - character to be validated
Returns:
True if character is valid Token character else it returns false

isWhiteSpace

boolean isWhiteSpace(char c)
This function returns TRUE if the character is linear white space (LWS). LWS = [CRLF] 1*( SP | HT )

Parameters:
c - character to be validated
Returns:
True if character is liner whitespace else it returns false

All LDAP Classes
Internal LDAP Classes

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000