Author |
Message
|
Shann |
Posted: Wed Jun 22, 2005 7:56 pm Post subject: 2 bytes is appended to MQMessage |
|
|
Newbie
Joined: 22 Jun 2005 Posts: 2 Location: Singapore
|
Hi pals,
I would like to ask you guys something. I discovered that 2 bytes of characters are appended to the front of the message. Does anyone know it is a norm or exceptional? |
|
Back to top |
|
 |
EddieA |
Posted: Wed Jun 22, 2005 10:24 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Let me take a guess. You're using a writeUTF method to write a string. Guess it's time to read the manual to understand what this actually does.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 23, 2005 12:55 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
and why this is not translated even though the format may be MQSTR |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jun 23, 2005 1:05 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
fjb_saper wrote: |
and why this is not translated even though the format may be MQSTR |
Who says it isn't. If you define this message as MQSTR, those bytes will almost certainly be corrupted.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 23, 2005 7:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I thought it said something about writeUTF not being translated in the manuals. Makes total sense as you would retrieve it using readUTF...
So why translate from UTF to UTF.??
Enjoy  |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Jun 24, 2005 5:40 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
If you mark the message format as MQSTR, then the data will definitely be translated. However, the data isn't MQSTR and the two bytes of length will get translated into who knows what.... |
|
Back to top |
|
 |
Shann |
Posted: Wed Jun 29, 2005 5:09 pm Post subject: |
|
|
Newbie
Joined: 22 Jun 2005 Posts: 2 Location: Singapore
|
Hi EddieA,
Yes. Cool! You (IBM Certified Specialist, IBM Certified Developer, IBM Certified Solutions Expert) are darn right! I am using writeUTF to put messages into the queue.
I would like to seek your advice on how can I overcome this - if I write the message using writeUTF, then, am I right to say that when getting the message, I need to use readUTF?
EddieA wrote: |
Let me take a guess. You're using a writeUTF method to write a string. Guess it's time to read the manual to understand what this actually does.
Cheers, |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 29, 2005 5:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
EddieA wrote: |
Guess it's time to read the manual to understand what this actually does. |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|