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

## rabbit.filter
Class BodyFilter

    java.lang.Object
      rabbit.filter.HTMLFilter
          rabbit.filter.SimpleTagFilter
              rabbit.filter.BodyFilter

All Implemented Interfaces:
  HTMLFilterFactory

    public class BodyFilter

extends SimpleTagFilter

A class that inserts some text and links at the top of a page. Useful for inserting links to unfiltered page.

Field Summary

Fields inherited from class rabbit.filter.HTMLFilter
`con, request, response`

Constructor Summary
`BodyFilter()`
`BodyFilter(Connection con, HTTPHeader request, HTTPHeader response)` Create a new BodyFilter for the given request, response pair.

Method Summary
`void` | `filterHTML(HTMLBlock block)` Insert some text at the top of the html page.
`void` | `handleTag(Tag tag, HTMLBlock block, int tokenIndex)` Handle a tag.
`protected int` | `insertTokens(HTMLBlock block, int pos)` Insert the links in an ordered fashion.
`HTMLFilter` | `newFilter(Connection con, HTTPHeader request, HTTPHeader response)` Get a new HTMLFilter for the given request, response pair.

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

Constructor Detail

### BodyFilter

    public BodyFilter()

### BodyFilter

    public BodyFilter(Connection con,
                      HTTPHeader request,
                      HTTPHeader response)

  Create a new BodyFilter for the given request, response pair.

  Parameters:
    `con` - the Connection handling the request.
    `request` - the actual request made.
    `response` - the actual response being sent.

Method Detail

### newFilter

    public HTMLFilter newFilter(Connection con,
                                HTTPHeader request,
                                HTTPHeader response)

  Description copied from class: `HTMLFilter`
  Get a new HTMLFilter for the given request, response pair.

  Specified by:
    `newFilter` in interface `HTMLFilterFactory`
  Specified by:
    `newFilter` in class `HTMLFilter`
  Parameters:
    `con` - the Connection handling the request.
    `request` - the actual request made.
    `response` - the actual response being sent.

### filterHTML

    public void filterHTML(HTMLBlock block)

  Insert some text at the top of the html page.

  Overrides:
    `filterHTML` in class `SimpleTagFilter`
  Parameters:
    `block` - the part of the html page we are filtering.

### handleTag

    public void handleTag(Tag tag,
                          HTMLBlock block,
                          int tokenIndex)

  Description copied from class: `SimpleTagFilter`
  Handle a tag.

  Specified by:
    `handleTag` in class `SimpleTagFilter`
  Parameters:
    `tag` - the Tag to handle.
    `block` - the current HTMLBlock
    `tokenIndex` - the index of the current Token

### insertTokens

    protected int insertTokens(HTMLBlock block,
                               int pos)

  Insert the links in an ordered fashion.

  Parameters:
    `block` - the html block were filtering.
    `pos` - the position in the block were inserting stuff at.
  Returns:
    the new position in the block.

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