Search code examples
javaphphttpnetwork-programmingflatbuffers

How to send FlatBuffers ByteBuffer over network?


I want to send the ByteBuffer from FlatBuffers over network to an Android Application. I tried using echo $builder->sizedByteArray, but then I'm wondering how to deserialize this String.


Solution

  • Note that this bytearray has to be sent in a way suited to binary transmission, not text.

    As for deserialization with Java, have you looked here: https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html (make sure you select Java as your language) ? You can use ByteBuffer.wrap with a byte[] you received over the network.