org.apache.ddlutils.io.converters
Class ByteArrayBase64Converter
java.lang.Object
org.apache.ddlutils.io.converters.ByteArrayBase64Converter
- All Implemented Interfaces:
- SqlTypeConverter
- public class ByteArrayBase64Converter
- extends Object
- implements SqlTypeConverter
Converts between a byte array and its Base64 encoded string representation (e.g. for use in XML).
- Version:
- $Revision: $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArrayBase64Converter
public ByteArrayBase64Converter()
convertFromString
public Object convertFromString(String textRep,
int sqlTypeCode)
throws ConversionException
- Converts the given textual representation to an instance of the target type.
- Specified by:
convertFromString
in interface SqlTypeConverter
- Parameters:
textRep
- The textual representationsqlTypeCode
- The target sql type code, one of the constants in Types
- Returns:
- The corresponding object
- Throws:
ConversionException
convertToString
public String convertToString(Object obj,
int sqlTypeCode)
throws ConversionException
- Converts the given object to a string representation.
- Specified by:
convertToString
in interface SqlTypeConverter
- Parameters:
obj
- The objectsqlTypeCode
- The corresponding source type code
- Returns:
- The textual representation
- Throws:
ConversionException
Copyright © 2005-2006 Apache Software Foundation. All Rights Reserved.