Bin8 Support for Scala/Java

14 views
Skip to first unread message

Thomas Zimmer

unread,
Apr 10, 2015, 3:47:00 AM4/10/15
to msg...@googlegroups.com
Hi,

i am not sure how todo this but I have a C++ struct which looks like this:

struct Foo{
  msgpack::type::raw_ref message;
}


When i assign the value to the struct it will be binary 0xC4 10 (For a 16 bit binary value). But i was not able to read the values in Scala where my class looks like this:

class Foo {
   
var data: Array[Byte] = _
}


My guess is that the template/ msg-packer uses a different interpreation byte-arrays (See https://github.com/msgpack/msgpack-java/blob/v06/src/main/java/org/msgpack/packer/MessagePackPacker.java -> writeByteArray) and encodes it to "0xa0". I also tried with ByteBuffer with no luck. 

Can you guys think of any other solution?


Regards,
Thomas
Reply all
Reply to author
Forward
0 new messages