net.spy.util
Class SpyToker

java.lang.Object
  extended by net.spy.util.SpyToker

public class SpyToker
extends java.lang.Object

A simple token in-plugger.

Input files are in any textual format, with tokens in the format of %TOKEN% where TOKEN is a valid token that can be found in the hash passed in to the tokenizer.


Constructor Summary
SpyToker()
          Construct a SpyToker.
 
Method Summary
 java.lang.String tokenize(java.io.File file, java.util.Map m)
          Tokenize a file.
 java.lang.String tokenizeString(java.lang.String input, java.util.Map m)
          Tokenize a String, return the tokenized results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpyToker

public SpyToker()
Construct a SpyToker.

Method Detail

tokenizeString

public java.lang.String tokenizeString(java.lang.String input,
                                       java.util.Map m)
Tokenize a String, return the tokenized results.

Parameters:
input - the input string
m - the map of tokens (without percents)
Returns:
the tokenized string

tokenize

public java.lang.String tokenize(java.io.File file,
                                 java.util.Map m)
Tokenize a file.

Parameters:
file - file to tokenize
p - Map whose entries will be looked up to fill in the tokens in the text file.
Returns:
tokenized data from the file.


Copyright © 1995-2005 SPY Internetworking. All Rights Reserved.