All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.xmlmiddleware.conversions.formatters.external.Base64Formatter

java.lang.Object
   |
   +----org.xmlmiddleware.conversions.formatters.external.Base64Formatter

public class Base64Formatter
extends Object
implements StringFormatter
Implements the StringFormatter interface for binary data represented as Base64.

THIS CLASS NOT YET IMPLEMENTED. IT IS INCLUDED FOR COMPLETENESS.

Version:
2.0
Author:
Ronald Bourret, 2001
See Also:
ByteArray

Constructor Index

 o Base64Formatter()

Method Index

 o canConvert(int)
Whether the class can convert to/from a certain type of object.
 o format(Object)
Format an org.xmlmiddleware.conversions.ByteArray object as Base64.
 o parse(String, int)
Parse a Base64 string and return it as an org.xmlmiddleware.conversions.ByteArray object.

Constructors

 o Base64Formatter
 public Base64Formatter()

Methods

 o parse
 public Object parse(String s,
                     int jdbcType) throws XMLMiddlewareException
Parse a Base64 string and return it as an org.xmlmiddleware.conversions.ByteArray object.

Parameters:
The - string to parse.
A - JDBC Types value indicating the type of object to return.
Returns:
An org.xmlmiddleware.conversions.ByteArray.
Throws: XMLMiddlewareException
Thrown if the string can't be parsed.
 o format
 public String format(Object o) throws XMLMiddlewareException
Format an org.xmlmiddleware.conversions.ByteArray object as Base64.

Parameters:
The - object to serialize. Must be an org.xmlmiddleware.conversion.ByteArray.
Returns:
The string
Throws: XMLMiddlewareException
Thrown if the object is not an org.xmlmiddleware.conversion.ByteArray.
 o canConvert
 public boolean canConvert(int type)
Whether the class can convert to/from a certain type of object.

This method returns true for Types.BINARY, VARBINARY, and LONGVARBINARY. It returns false for all other types.

Parameters:
type - The JDBC Types value corresponding to the object type.
Returns:
Whether the type is supported

All Packages  Class Hierarchy  This Package  Previous  Next  Index