It is required to teach the Android device to send and receive commands as an array of bytes over a TCP connection. Transmitted commands are known in advance, received data is not. In this case, when sending a command, the first few bytes will be informational. Tell me how to properly perform this task? Is it worth using Serialization / Parcebale for this purpose or you can do with standard inputstream / outputstream . If the second option, which command is better to use for I / O. It seems to me that ByteArrayInputStream is most suitable here, but almost all examples use BufferedOutputStream , DataOutputStream or FileOutputStream .
|
int a = 0xfff1- Vladyslav MatviienkoInteger.decode(hexString). For example,int a = Integer.decode("0x4d2");- Vladyslav Matviienkobyte a = (byte) 0xFFF1;Will it be another value? - MrStuff88