Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

JMS%20Interview%20Questions%20and%20Answers

Question: 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 allwed in case of BytesMessage. This is so because the StreamMessage also writes the type information alonwgith the value of the primitive type and enforces a set of strict conversion rules which actually prevents reading of one primitive type as another.
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook