org.mmbase.util.transformers
Class StringTransformer

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

public abstract class StringTransformer
extends java.lang.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

Constructor Summary
StringTransformer()
           
 
Method Summary
 java.io.Writer transform(java.io.Reader r)
           
 java.io.Writer transform(java.io.Reader r, java.io.Writer w)
          An implemention for tranform(Reader, Writer) based on transform(String).
abstract  java.lang.String transform(java.lang.String r)
           
 java.io.Writer transformBack(java.io.Reader r)
           
 java.io.Writer transformBack(java.io.Reader r, java.io.Writer w)
           
 java.lang.String transformBack(java.lang.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 java.lang.String transform(java.lang.String r)
Specified by:
transform in interface CharTransformer

transformBack

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

transform

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

transformBack

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

transform

public java.io.Writer transform(java.io.Reader r,
                                java.io.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 java.io.Writer transformBack(java.io.Reader r,
                                    java.io.Writer w)
Specified by:
transformBack in interface CharTransformer


MMBase build 1.7.1.20041002