Class CompositeCodec
java.lang.Object
org.springframework.integration.codec.CompositeCodec
- All Implemented Interfaces:
 Codec
- 
Constructor Summary
ConstructorsConstructorDescriptionCompositeCodec(Map<Class<?>, Codec> delegates, Codec defaultCodec) CompositeCodec(Codec defaultCodec) Deprecated, for removal: This API element is subject to removal in a future version. - 
Method Summary
Modifier and TypeMethodDescription<T> TDecode an object of a given type.<T> Tdecode(InputStream inputStream, Class<T> type) Decode an object of a given type.byte[]Encode an object to a byte array.voidencode(Object object, OutputStream outputStream) Encode (encode) an object to an OutputStream. 
- 
Constructor Details
- 
CompositeCodec
 - 
CompositeCodec
Deprecated, for removal: This API element is subject to removal in a future version.since 6.4.6 in favor ofCompositeCodec(Map, Codec)with provided delegates.- Parameters:
 defaultCodec- codec for fallback
 
 - 
 - 
Method Details
- 
encode
Description copied from interface:CodecEncode (encode) an object to an OutputStream.- Specified by:
 encodein interfaceCodec- Parameters:
 object- the object to encodeoutputStream- the OutputStream- Throws:
 IOException- if the operation fails
 - 
encode
Description copied from interface:CodecEncode an object to a byte array.- Specified by:
 encodein interfaceCodec- Parameters:
 object- the object to encode- Returns:
 - the bytes
 - Throws:
 IOException- if the operation fails
 - 
decode
Description copied from interface:CodecDecode an object of a given type.- Specified by:
 decodein interfaceCodec- Type Parameters:
 T- the object's type- Parameters:
 inputStream- the input stream containing the encoded objecttype- the object's class- Returns:
 - the object
 - Throws:
 IOException- if the operation fails
 - 
decode
Description copied from interface:CodecDecode an object of a given type.- Specified by:
 decodein interfaceCodec- Type Parameters:
 T- the object's type- Parameters:
 bytes- the byte array containing the encoded objecttype- the object's class- Returns:
 - the object
 - Throws:
 IOException- if the operation fails
 
 - 
 
CompositeCodec(Map, Codec)with provided delegates.