    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.www.protocol.http.proxy.RuleParser

    java.lang.Object
       |
       +----org.w3c.www.protocol.http.proxy.RuleParser

public class RuleParser
extends Object

A simple Rule parser.

##

RuleParser(InputStream)
  Create a rule parser to parse the given input stream.

##

addRule(String[], Rule)
  Add a mapping for the given rule in our rule node.
parse()
  Parse the our input stream into a RuleNode instance.
parseRule(String[], int)
  Create a suitable rule mapping for the tokenized rule.

##

RuleParser

     public RuleParser(InputStream in)

  Create a rule parser to parse the given input stream.

##

addRule

     protected void addRule(String lhs[],
                            Rule rule)

  Add a mapping for the given rule in our rule node.

  Parameters:
    lhs - The rule left hand side, as a parsed String array.
    rule - The mapped rule instance.

parseRule

     protected void parseRule(String tokens[],
                              int toklen) throws RuleParserException

  Create a suitable rule mapping for the tokenized rule.

  Parameters:
    tokens - The rule tokens, as a String array.
    toklen - Number of tokens in above array.
  Throws: RuleParserException
    if parsing failed.

parse

     public RuleNode parse() throws RuleParserException, IOException

  Parse the our input stream into a RuleNode instance.

  Throws: IOException
    If reading the rule input stream failed.
  Throws: RuleParserException
    If some invalid rule syntax was detected.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index