com.ryanm.config.serial.imp
Class FileCodec

java.lang.Object
  extended by com.ryanm.config.serial.imp.FileCodec
All Implemented Interfaces:
ConfiguratorCodec

public class FileCodec
extends java.lang.Object
implements ConfiguratorCodec

Author:
s9902505

Constructor Summary
FileCodec()
           
 
Method Summary
 java.lang.Object decode(java.lang.String encoded)
          Decodes the encoded string into a value object
 java.lang.String encode(java.lang.Object value)
          Encodes the value of a given object
 java.lang.Class getType()
          Gets the type identifier that this codec object can handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileCodec

public FileCodec()
Method Detail

encode

public java.lang.String encode(java.lang.Object value)
                        throws CodecException
Description copied from interface: ConfiguratorCodec
Encodes the value of a given object

Specified by:
encode in interface ConfiguratorCodec
Parameters:
value - The value to encode
Returns:
The String encoding for the value, or null if encoding was not possible
Throws:
CodecException - If the supplied object cannot be handled by this codec

decode

public java.lang.Object decode(java.lang.String encoded)
                        throws CodecException
Description copied from interface: ConfiguratorCodec
Decodes the encoded string into a value object

Specified by:
decode in interface ConfiguratorCodec
Parameters:
encoded - The encoded string
Returns:
The value of the encoded string
Throws:
CodecException - If the supplied encoded data cannot be parsed by this codec

getType

public java.lang.Class getType()
Description copied from interface: ConfiguratorCodec
Gets the type identifier that this codec object can handle

Specified by:
getType in interface ConfiguratorCodec
Returns:
The type identifier