You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Thomas Termin (JIRA)" <ji...@apache.org> on 2013/04/22 21:07:17 UTC

[jira] [Created] (CAMEL-6302) Mina UDP default codec should keep the data as byte[]

Thomas Termin created CAMEL-6302:
------------------------------------

             Summary: Mina UDP default codec should keep the data as byte[] 
                 Key: CAMEL-6302
                 URL: https://issues.apache.org/jira/browse/CAMEL-6302
             Project: Camel
          Issue Type: Bug
          Components: camel-mina
    Affects Versions: 2.10.4
            Reporter: Thomas Termin


The MinaUdpProtocolCodecFactory on the consumer side decodes data from an udp datagram to a byte[].

    byte[] bytes = context.getTypeConverter().convertTo(byte[].class, in);

On the provider side where it gets back to the wire it gets converted to a string:

    String value = context.getTypeConverter().convertTo(String.class, message);

and then set to the ByteBuffer with the given charset.

The result is that the original datagram is not valid anymore. The default codec should the data convert to a byte array or keep the data as byte array. 



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira