I want to convert Message type to byte[]
without going through string, because I need it for performance issues.
I should not pass through string (Message
to string to byte[]
).
Message type:javax.jms.MessageConsumer
I want to convert Message type to byte[]
without going through string, because I need it for performance issues.
I should not pass through string (Message
to string to byte[]
).
Message type:javax.jms.MessageConsumer
If your 'Message' class implements Serializeable, then you can convert it directly into a byte[].
In Java, Serialization is the conversion of an object to a series of bytes, so that the object can be easily saved to persistent storage or streamed across a communication link. The byte stream can then be deserialized - converted into a replica of the original object.
Here's a link to a nice tutorial on serialization in Java.