Start a new topic

Storing a byte array?

I'm currently storing a series of byte arrays in a Kinvey collection, written to it via a Java endpoint - one thing I'm wondering about is when I store the byte array does Kinvey store its raw data or does convert it to a string/other format and store that?



Thanks!
1 Comment

Hey,



We use GSON for json serialization in the library.



When I save:



new byte[]{(byte)0xe0, 0x4f, (byte)0xd0, (byte)0xea, (byte)0x20}



the console shows:



[-32,79,-48,-22,32]



So, it looks like we are storing int representations of the byte values. There are a ton of ways to translate back and forth between `int`, `Integers`, `byte`, and `Byte`, depending on what you need to accomplish.



Login or Signup to post a comment