de.mud.telnet
Class ScriptHandler

java.lang.Object
  |
  +--de.mud.telnet.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,v 1.1 2000/01/04 08:54:49 leo Exp $
Author:
Matthias L. Jugel, Marcus Meißner

Constructor Summary
ScriptHandler()
           
 
Method Summary
 boolean match(byte[] s, int length)
          Try to match the byte array s against the match string.
 void setup(java.lang.String match)
          Setup the parser using the passed string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptHandler

public ScriptHandler()
Method Detail

setup

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

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