title: Conversion of unreadable string from TCP IP port in java
body: <p>I am trying to read continuous data from TCP IP port of system using Java Socket Programming ServerSocket but I am getting unreadable string data like in following following image :</p>
  <p><a href="https://i.stack.imgur.com/3i5kY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3i5kY.png" alt="enter image description here" /></a></p>
  <p>I am using following code for read data from TCP IP port :</p>
  <pre><code> ServerSocket server_socket;
              BufferedReader input;
              try {
                  server_socket = new ServerSocket(6666);
                  LOGGER.info(&quot;Server waiting for client on port &quot;
                          + server_socket.getLocalPort());
                  System.out.println(&quot;Server waiting for client on port &quot;
                          + server_socket.getLocalPort());
                  while (true) {
                      Socket socket = server_socket.accept();
  
                      input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                      try {
                          while (true) {
                              String message = input.readLine();
                              if (message == null) {
                                  break;
                              }
  
                          }
                      } catch (Exception e) {
                          socket.close();
                          e.printStackTrace();
                      }
                  }
              } catch (Exception e) {
                  e.printStackTrace();
              }
  </code></pre>
  <hr />
  <p>So please let me know what kind of data are in above image and what conversion I should do?</p>
  <p>Thanks in advance.</p>