void read(Reader policy) throws ParsingException, IOException {
  if (!(policy instanceof BufferedReader)) {
    policy=new BufferedReader(policy);
  }
  st=new StreamTokenizer(policy);
  st.resetSyntax();
  st.wordChars('a','z');
  st.wordChars('A','Z');
  st.wordChars('.','.');
  st.wordChars('0','9');
  st.wordChars('_','_');
  st.wordChars('$','$');
  st.wordChars(128 + 32,255);
  st.whitespaceChars(0,' ');
  st.commentChar('/');
  st.quoteChar('\'');
  st.quoteChar('"');
  st.lowerCaseMode(false);
  st.ordinaryChar('/');
  st.slashSlashComments(true);
  st.slashStarComments(true);
  st.parseNumbers();
  Hashtable<String,Vector<String>> processedPermissions=null;
  lookahead=st.nextToken();
  while (lookahead != StreamTokenizer.TT_EOF) {
    if (peek("grant")) {
      GrantEntry ge=parseGrantEntry(processedPermissions);
      if (ge != null)       grantEntries.addElement(ge);
    }
 else {
      throw new ParsingException(st.lineno(),"expected grant " + "statement");
    }
    match(";");
  }
}

void read ( Reader policy ) throws ParsingException , IOException { if ( ! ( policy instanceof BufferedReader ) ) { policy = new BufferedReader ( policy ) ; } st = new StreamTokenizer ( policy ) ; st . resetSyntax ( ) ; st . wordChars ( 'a' , 'z' ) ; st . wordChars ( 'A' , 'Z' ) ; st . wordChars ( '.' , '.' ) ; st . wordChars ( '0' , '9' ) ; st . wordChars ( '_' , '_' ) ; st . wordChars ( '$' , '$' ) ; st . wordChars ( 128 + 32 , 255 ) ; st . whitespaceChars ( 0 , ' ' ) ; st . commentChar ( '/' ) ; st . quoteChar ( '\'' ) ; st . quoteChar ( '"' ) ; st . lowerCaseMode ( false ) ; st . ordinaryChar ( '/' ) ; st . slashSlashComments ( true ) ; st . slashStarComments ( true ) ; st . parseNumbers ( ) ; Hashtable < String , Vector < String > > processedPermissions = null ; lookahead = st . nextToken ( ) ; while ( lookahead != StreamTokenizer . TT_EOF ) { if ( peek ( "grant" ) ) { GrantEntry ge = parseGrantEntry ( processedPermissions ) ; if ( ge != null ) grantEntries . addElement ( ge ) ; } else { throw new ParsingException ( st . lineno ( ) , "expected grant " + "statement" ) ; } match ( ";" ) ; } }
reads a policy configuration using a reader object . < p >
