ByteMessage readUTF get truncated message
When trying to call ByteMessage.readUTF() to convert the byteMessage to String text, in most cases, it works perfect.
But we found if the message is bigger (for example, 500K), ByteMessage.readUTF() will truncate the message into bad format.
For example, in my test case, I expect a byteMessage with XML content, however, it gives me a malformed xml:
first line: <xml version="1.0" encoding="utf-8"?>
becomes" xml version="1.0" encoding="utf-8"?>, without the starting '<'
and the xml is truncated - the filesize seems to be limited as 16k.
this problem happens for MQ and Weblogic JMS, so I believe it is not 3rd party library or service provider specific, seems it is from JDK.
btw, I am using JDK 1.6+.
any idea how this could happen? any solution for this?
Edited by: qjvictor on Oct 1, 2012 1:12 PM
Edited by: qjvictor on Oct 1, 2012 1:12 PM