de.mud.telnet

Class ScriptHandler


public class ScriptHandler
extends java.lang.Object

A script handler, that tries to match strings and returns true when it found the string it searched for.

Maintainer: Matthias L. Jugel

Version:
$Id: ScriptHandler.java 499 2005-09-29 08:24:54Z leo $
Author:
Matthias L. Jugel, Marcus Mei???ner

Method Summary

boolean
match(byte[] s, int length)
Try to match the byte array s against the match string.
void
setup(String match)
Setup the parser using the passed string.

Method Details

match

public boolean match(byte[] s,
                     int length)
Try to match the byte array s against the match string.
Parameters:
s - the array of bytes to match against
length - the amount of bytes in the array
Returns:
true if the string was found, else false

setup

public void setup(String match)
Setup the parser using the passed string.
Parameters:
match - the string to look for