org.mmbase.util.transformers
Class StringTransformer

java.lang.Object
  extended byorg.mmbase.util.transformers.StringTransformer
All Implemented Interfaces:
CharTransformer, Serializable, Transformer
Direct Known Subclasses:
AbstractCommandStringTransformer, CodeSampleFactory.CodeSample, ConfigurableStringTransformer, MD5, RomanTransformer, Smilies

public abstract class StringTransformer
extends Object
implements CharTransformer

You need only to implement transform(String) you have the simplest kind of tranformer (which is not 'streamable'). The name becoming your class name.

Since:
MMBase-1.7
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Constructor Summary
StringTransformer()
           
 
Method Summary
 Writer transform(Reader r)
           
 Writer transform(Reader r, Writer w)
          An implemention for tranform(Reader, Writer) based on transform(String).
abstract  String transform(String r)
           
 Writer transformBack(Reader r)
           
 Writer transformBack(Reader r, Writer w)
           
 String transformBack(String r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.util.transformers.Transformer
toString
 

Constructor Detail

StringTransformer

public StringTransformer()
Method Detail

transform

public abstract String transform(String r)
Specified by:
transform in interface CharTransformer

transformBack

public final Writer transformBack(Reader r)
Specified by:
transformBack in interface CharTransformer

transform

public final Writer transform(Reader r)
Specified by:
transform in interface CharTransformer

transformBack

public String transformBack(String r)
Specified by:
transformBack in interface CharTransformer

transform

public Writer transform(Reader r,
                        Writer w)
An implemention for tranform(Reader, Writer) based on transform(String). These functions can be used by extensions to implement transform and transformBack

Specified by:
transform in interface CharTransformer

transformBack

public Writer transformBack(Reader r,
                            Writer w)
Specified by:
transformBack in interface CharTransformer


MMBase build 1.8.1.20060716