I am trying to pass a String value in socket to another server. The other server should receive the value in hex format.
i.e If my String is s = "600185838e" at the server it should receive as 60 01 85 83 8e, but these values what I sent are been converted to ASCII & is not in the desired format.
I am using socket connection
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(this.socket.getOutputStream()));
wr.write(messageBody);
wr.flush();
How can I send my String value similar as Hex value?
Thanking you all in advance