com.ryanm.config.serial.imp
Class StringCodec

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

public class StringCodec
extends java.lang.Object
implements ConfiguratorCodec

Author:
s9902505

Constructor Summary
StringCodec()
           
 
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

StringCodec

public StringCodec()
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)
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

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