Package com.opencloud.slee.profile.codec
Interface Codec<T>
-
public interface Codec<T>
Codecs convert objects to a suitable string form and vice versa. Codecs are only expected to deal with objects of their basic defined type. Arrays of the type supported by the codec are seperated into individual array element components before being passed to a codec for conversion.
- See Also:
CodecFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
toObject(String value)
Convert a string form of an object back into the corresponding object.String
toString(T value)
Convert an object to a string form.
-
-
-
Method Detail
-
toString
String toString(T value) throws IOException
Convert an object to a string form.
- Parameters:
value
- the value to convert. This value will never benull
.- Returns:
- a string form of the object.
- Throws:
IOException
- if the object cannot be converted.
-
toObject
T toObject(String value) throws IOException
Convert a string form of an object back into the corresponding object.
- Parameters:
value
- the value to convert. This value will never benull
.- Returns:
- an object form of the string value.
- Throws:
IOException
- if the string value cannot be converted into an object.
-
-