Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

public class RuleParser
extends java.lang.Object

A simple Rule parser.

Constructor Summary
`RuleParser(java.io.InputStream in)` Create a rule parser to parse the given input stream.

Method Summary
`protected void` | `addRule(java.lang.String[] lhs, Rule rule)` Add a mapping for the given rule in our rule node.
`RuleNode` | `parse()` Parse the our input stream into a RuleNode instance.
`protected void` | `parseRule(java.lang.String[] tokens, int toklen)` Create a suitable rule mapping for the tokenized rule.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RuleParser

    public RuleParser(java.io.InputStream in)

  Create a rule parser to parse the given input stream.

Method Detail

### addRule

    protected void addRule(java.lang.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(java.lang.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,
                          java.io.IOException

  Parse the our input stream into a RuleNode instance.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD