Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.security.auth.login
Class ConfigFileTokenizer  view ConfigFileTokenizer download ConfigFileTokenizer.java

java.lang.Object
  extended bygnu.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.


Field Summary
private  java.io.BufferedReader br
           
private static boolean DEBUG
           
(package private)  boolean initialised
           
private  java.lang.StringBuffer sb
           
private  int sbNdx
           
 java.lang.String sval
           
static int TT_EOF
          A constant indicating that the end of the stream has been read.
private static int TT_NONE
          A constant indicating that no tokens have been read yet.
static int TT_WORD
          A constant indicating that a word token has been read.
 int ttype
           
 
Constructor Summary
(package private) ConfigFileTokenizer(java.io.Reader r)
          Trivial constructor.
 
Method Summary
private  void abort(java.lang.String m)
           
private static void debug(java.lang.String m)
           
private  void init()
           
 int nextToken()
           
 void pushBack()
           
private  void skipWhitespace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

ConfigFileTokenizer

ConfigFileTokenizer(java.io.Reader r)
Trivial constructor.

Method Detail

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