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.


Constructor Index

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

Method Index

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

Constructors

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

Methods

 o 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.
 o 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.
 o 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