net.spy.util
Class SpyToker

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

public class SpyToker
extends 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
 String tokenize(File file, Map<String,String> m)
          Tokenize a file.
 String tokenizeString(String input, Map<String,String> 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 String tokenizeString(String input,
                             Map<String,String> 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 String tokenize(File file,
                       Map<String,String> m)
Tokenize a file.

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


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