Package org.acemq.amqp.core
Class BytesCodec
java.lang.Object
org.acemq.amqp.core.BytesCodec
- All Implemented Interfaces:
Codec
Passes bytes through untouched.
For payloads that are already encoded by something else: an image, a file, a message serialised by a library the application would rather call itself. Encoding twice is a common and quiet mistake, and this is the way to say that it has been done once already.
Never offered to a message that did not ask for it. It would accept any bytes at all and
hand a consumer a byte[] where an object was expected, so it sits at the very back of
the order and only claims application/octet-stream.
-
Constructor Details
-
BytesCodec
public BytesCodec()
-
-
Method Details
-
contentType
- Specified by:
contentTypein interfaceCodec- Returns:
- the content type this codec produces, for example
application/json
-
encode
-
decode
-
canDecode
-
toString
-