de.dfki.util.xmlrpc.converters
Class FileConverter

java.lang.Object
  extended by de.dfki.util.xmlrpc.converters.FileConverter
All Implemented Interfaces:
ParameterConverter<java.io.File,java.lang.String>

public class FileConverter
extends java.lang.Object
implements ParameterConverter<java.io.File,java.lang.String>

Converter for Files.

Author:
lauer

Constructor Summary
FileConverter()
           
 
Method Summary
 java.io.File createFrom(java.lang.String xmlRpcRepresentation)
          Creates an instance of parameter type T.
 XmlRpc.Type getXmlRpcRepresentationType()
           
 java.lang.String toXmlRpc(java.io.File param)
          Transforms a parameter into it's XML-RPC representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileConverter

public FileConverter()
Method Detail

getXmlRpcRepresentationType

public XmlRpc.Type getXmlRpcRepresentationType()
Specified by:
getXmlRpcRepresentationType in interface ParameterConverter<java.io.File,java.lang.String>
Returns:
The XML-RPC type the converter uses as XML-RPC representation.

createFrom

public java.io.File createFrom(java.lang.String xmlRpcRepresentation)
                        throws TypeConversionException
Description copied from interface: ParameterConverter
Creates an instance of parameter type T.

Specified by:
createFrom in interface ParameterConverter<java.io.File,java.lang.String>
Parameters:
xmlRpcRepresentation - The structure transfered via XML-RPC.
Returns:
The new instance. May also be null.
Throws:
TypeConversionException

toXmlRpc

public java.lang.String toXmlRpc(java.io.File param)
                          throws TypeConversionException
Description copied from interface: ParameterConverter
Transforms a parameter into it's XML-RPC representation.

Specified by:
toXmlRpc in interface ParameterConverter<java.io.File,java.lang.String>
Parameters:
param - The parameter to convert. May be null.
Returns:
A XML-RPC representation (must not be null).
Throws:
TypeConversionException


Copyright © 2012. All Rights Reserved.