title: How can I convert bytes into more useful data?
body: <pre class="lang-java prettyprint-override"><code>while (true) {
      byte[] buffer = new byte[1024];
  
      InputStream input = socket.getInputStream();
  
      bytes = input.read(buffer);
      Log.d(TAG, &quot;byte = &quot; + bytes);
  }
  </code></pre>
  <p>When I run this code, I can see just <code>bytes = 32</code> in Log.</p>
  <p>What I planned is showing whole data like 'Temperature:26.7 C, humidity:40%'m but all I can see is just <code>bytes=32</code>.</p>
  <p>How can I show this received data in original form?</p>