org.mmbase.util.transformers
Class Base64
java.lang.Object
org.mmbase.util.transformers.ByteArrayToCharTransformer
org.mmbase.util.transformers.Base64
- All Implemented Interfaces:
- ByteToCharTransformer, ConfigurableTransformer, Serializable, Transformer
- public class Base64
- extends ByteArrayToCharTransformer
- implements ByteToCharTransformer, ConfigurableTransformer
Uses the sun.misc classes to do BASE64 encoding and decoding. The
sun.misc classes are not supported by Sun. Perhaps once we have to
plug in another class.
- Author:
- Michiel Meeuwissen
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
configure
public void configure(int t)
- Description copied from interface:
ConfigurableTransformer
- If a transformer can handle more then one destination
format, it can be configured with this.
There must be a default, since
to can be null.
- Specified by:
configure in interface ConfigurableTransformer
transformers
public Map transformers()
- Used when registering this class as a possible Transformer
- Specified by:
transformers in interface ConfigurableTransformer
- Returns:
- A Map with String Integer/Class pairs.
transform
public String transform(byte[] bytes)
- Specified by:
transform in interface ByteToCharTransformer- Specified by:
transform in class ByteArrayToCharTransformer
transformBack
public byte[] transformBack(String r)
- Specified by:
transformBack in interface ByteToCharTransformer- Overrides:
transformBack in class ByteArrayToCharTransformer
getEncoding
public String getEncoding()
- Description copied from interface:
ConfigurableTransformer
- Returns the encoding that is currently active
- Specified by:
getEncoding in interface ConfigurableTransformer
- Returns:
- An String representing the coding that is currently used.
MMBase build 1.8.1.20060716