java.lang.Object
gnu.javax.security.auth.login.ConfigFileTokenizer
- public class ConfigFileTokenizer
- extends java.lang.Object
A UTF-8 friendly, JAAS Login Module Configuration file tokenizer written in
the deault syntax. This class emulates, to a certain extent, the behavior of
a java.io.SrteamTokenizer
instance st
, when set as
follows:
st.resetSyntax();
st.lowerCaseMode(false);
st.slashSlashComments(true);
st.slashStarComments(true);
st.eolIsSignificant(false);
st.wordChars('_', '_');
st.wordChars('$', '$');
st.wordChars('A', 'Z');
st.wordChars('a', 'z');
st.wordChars('0', '9');
st.wordChars('.', '.');
st.whitespaceChars(' ', ' ');
st.whitespaceChars('\t', '\t');
st.whitespaceChars('\f', '\f');
st.whitespaceChars('\r', '\r');
st.whitespaceChars('\n', '\n');
st.quoteChar('"');
st.quoteChar('\'');
The most important (negative) difference with a
java.io.StreamTokenizer is that this tokenizer does not properly
handle C++ and Java // style comments in the middle of the line. It only
ignores them if/when found at the start of the line.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
private static final boolean DEBUG
- See Also:
- Constant Field Values
TT_EOF
public static final int TT_EOF
- A constant indicating that the end of the stream has been read.
- See Also:
- Constant Field Values
TT_WORD
public static final int TT_WORD
- A constant indicating that a word token has been read.
- See Also:
- Constant Field Values
TT_NONE
private static final int TT_NONE
- A constant indicating that no tokens have been read yet.
- See Also:
- Constant Field Values
sval
public java.lang.String sval
ttype
public int ttype
br
private java.io.BufferedReader br
initialised
boolean initialised
sb
private java.lang.StringBuffer sb
sbNdx
private int sbNdx
ConfigFileTokenizer
ConfigFileTokenizer(java.io.Reader r)
- Trivial constructor.
debug
private static final void debug(java.lang.String m)
nextToken
public int nextToken()
throws java.io.IOException
pushBack
public void pushBack()
init
private void init()
throws java.io.IOException
skipWhitespace
private void skipWhitespace()
throws java.io.IOException
abort
private void abort(java.lang.String m)
throws java.io.IOException