org.databene.commons.converter
Class ByteArrayToBase64Converter

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.ThreadSafeConverter<byte[],java.lang.String>
          extended by org.databene.commons.converter.ByteArrayToBase64Converter
All Implemented Interfaces:
java.lang.Cloneable, Converter<byte[],java.lang.String>, ThreadAware

public class ByteArrayToBase64Converter
extends ThreadSafeConverter<byte[],java.lang.String>

Converts byte arrays to base64 strings and vice versa.

Since:
0.2.04
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
ByteArrayToBase64Converter()
           
 
Method Summary
 java.lang.String convert(byte[] sourceValue)
          Concerts an object of type S to an object of type T
 
Methods inherited from class org.databene.commons.converter.ThreadSafeConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayToBase64Converter

public ByteArrayToBase64Converter()
Method Detail

convert

public java.lang.String convert(byte[] sourceValue)
                         throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Parameters:
sourceValue - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails


Copyright © 2010. All Rights Reserved.