1.

What Is The Use Of Streammessage?

Answer»

StreamMessage carries a stream of Java primitive types as it's payload. It contains some conveient methods for reading the data stored in the payload. However, StreamMessage prevents reading a long value as SHORT, something that is allowed in case of BytesMessage. This is so because the StreamMessage also writes the TYPE information along with the value of the primitive type and ENFORCES a set of strict CONVERSION rules which ACTUALLY prevents reading of one primitive type as another.

StreamMessage carries a stream of Java primitive types as it's payload. It contains some conveient methods for reading the data stored in the payload. However, StreamMessage prevents reading a long value as short, something that is allowed in case of BytesMessage. This is so because the StreamMessage also writes the type information along with the value of the primitive type and enforces a set of strict conversion rules which actually prevents reading of one primitive type as another.



Discussion

No Comment Found