How to convert a string into ByteBuffer in Java and store it in ByteBuffer in binary form, because it needs to be sent to C++
Please give me a detailed Java method, I don’t know much about ByteBuffer, thank you !
滿天的星座2017-05-16 13:31:23
You can first convert the string into a byte array byte[], and then use the put method of ByteBuffer to write it into the buffer.