Interface Codec<P,I,X extends Exception>
-
- Type Parameters:
P
- Product typeI
- Input typeX
- Error exception type
- All Superinterfaces:
Deserializer<I,P,X>
,Serializer<P,I,X>
- All Known Subinterfaces:
BinaryCodec<T>
,BitsCodec<T>
,BooleanCodec<T>
,DataStringCodec<T>
,DecimalCodec<T>
,EmptyCodec<T>
,EnumCodec<T>
,IdentityrefCodec<T>
,IllegalArgumentCodec<P,I>
,InstanceIdentifierCodec<T>
,Int16Codec<T>
,Int32Codec<T>
,Int64Codec<T>
,Int8Codec<T>
,LeafrefCodec<T>
,StringCodec<T>
,Uint16Codec<T>
,Uint32Codec<T>
,Uint64Codec<T>
,Uint8Codec<T>
,UncheckedCodec<P,I,X>
,UnionCodec<T>
- All Known Implementing Classes:
AbstractCodec
,AbstractDataStringCodec
,AbstractIllegalArgumentCodec
,AbstractIntegerStringCodec
,AbstractModuleStringIdentityrefCodec
,AbstractModuleStringInstanceIdentifierCodec
,AbstractStringIdentityrefCodec
,AbstractStringInstanceIdentifierCodec
,AbstractStringUnionCodec
,AbstractUncheckedCodec
,BinaryStringCodec
,BitsStringCodec
,BooleanStringCodec
,DecimalStringCodec
,EnumStringCodec
,ModuleStringIdentityrefCodec
,StringStringCodec
,TypeDefinitionAwareCodec
public interface Codec<P,I,X extends Exception> extends Serializer<P,I,X>, Deserializer<I,P,X>
The concept of a combinedSerializer
andDeserializer
, which produces an object from some input. Implementations should consider subclassingAbstractCodec
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description I
deserialize(P input)
Produce an object base on input.P
serialize(I input)
Convert an input into a product.
-
-
-
Method Detail
-
deserialize
I deserialize(P input) throws X extends Exception
Description copied from interface:Deserializer
Produce an object base on input.- Specified by:
deserialize
in interfaceDeserializer<P,I,X extends Exception>
- Parameters:
input
- Input object- Returns:
- Product derived from input
- Throws:
X
- when input is not validX extends Exception
-
serialize
P serialize(I input) throws X extends Exception
Description copied from interface:Serializer
Convert an input into a product.
-
-