title: how to send hexa value to socket server and recieve hexa response in java (eg.hexa value 000000000002001C)
body: <pre class="lang-java prettyprint-override"><code>run(){
            Socket connection = new Socket(address, port);
              BufferedOutputStream bos = new BufferedOutputStream(connection.getOutputStream());
  
              OutputStreamWriter osw = new OutputStreamWriter(bos, &quot;US-ASCII&quot;);
  
              String process = &quot;0x000000000002001c&quot;;
  
              System.out.println(&quot;Data to be sent is &quot; + process) ;
              /** Write across the socket connection and flush the buffer */
              osw.write(process);osw.flush();
              System.out.println(&quot;Data sent is &quot; + process) ;
  
  }
  </code></pre>