On Fri, Mar 1, 2013 at 3:12 PM, Emmanuel Lécharny <[email protected]> wrote: > Le 3/1/13 9:50 AM, Tejas Patel a écrit : >> Problem : >> >> When i transmit the byte array of [56, 34, 0, 4, -79, 1] from one device to >> another device on using Apache Camel Mina UDP endpoint, at receiver side byte >> Array is changed like [56, 34, 0, 4, -17, -65, -67, 1]. but when i transmit >> byte >> array like [56,34,0,4,78,0] from one device to another using same approach it >> will receive same byte array.
The example you give suggests that only negative values for a byte cause "corruption" of the received data, right? This might point to Codec issues, where data is decoded with a different Codec than they were encoded. For example if you encode text into bytes using UTF-8 and decode it using ISO-8859-1, you will experience such a corruption. Similarily, casts between byte, char, int etc could produce such a behavior. >> >> Can you suggest me how to resolve the issue? > No. > > Your desciption is at best extremely vague. It's like if you are asking > why a plane has crashed without giving us nothing but a picture of the > crashed plane... However, an expert might give an educated guess for the cause only by looking at the picture. Bernd
