You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Tejas Patel <te...@gmail.com> on 2013/03/01 09:50:00 UTC

changes the bytes of transmitting byte Array through apache camel mina UDP

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.

Can you suggest me how to resolve the issue?



Re: changes the bytes of transmitting byte Array through apache camel mina UDP

Posted by Bernd Fondermann <be...@gmail.com>.
On Fri, Mar 1, 2013 at 3:12 PM, Emmanuel Lécharny <el...@gmail.com> 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

Re: changes the bytes of transmitting byte Array through apache camel mina UDP

Posted by Jon V <sy...@gmail.com>.
+1 for great analogy.  


On Friday, March 1, 2013 at 9:12 AM, Emmanuel Lécharny 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.
> >  
> > 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...
>  
>  
>  
>  
> --  
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com (http://www.iktek.com)  
>  
>  



Re: changes the bytes of transmitting byte Array through apache camel mina UDP

Posted by Emmanuel Lécharny <el...@gmail.com>.
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.
>
> 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...




-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com