toolbox.web.template
Class DoBase64

Package class diagram package DoBase64
java.lang.Object
  extended by toolbox.web.template.DoBase64
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateModel

public class DoBase64
extends java.lang.Object
implements freemarker.template.TemplateMethodModel

Template helper to perform base64 encoding and decoding.


Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
DoBase64()
          Default constructor
 
Method Summary
 java.lang.Object exec(java.util.List args)
          Encode or decode a Base64 string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoBase64

public DoBase64()
Default constructor

Method Detail

exec

public java.lang.Object exec(java.util.List args)
                      throws freemarker.template.TemplateModelException
Encode or decode a Base64 string.

Specified by:
exec in interface freemarker.template.TemplateMethodModel
Parameters:
args - List containing two strings.
  • action: encode or decode.
  • string: string to encode or decode.
Returns:
Encoded or decoded base64 string.
Throws:
freemarker.template.TemplateModelException