Unreadable data is shown in android client socket application
<p>I have less knowledge in android programming.  In my android client application reads data send by non android server.  In my client receiving part showing unreadable data.  I also attaching code snippet</p>

<p><strong>socket &amp; data initialization part</strong></p>

<pre><code>InetAddress inetAdd = InetAddress.getByName(sServerIPAddress);
socket = new Socket( inetAdd, nServerPort );
datin = new DataInputStream(socket.getInputStream());
datout = new DataOutputStream(socket.getOutputStream());
</code></pre>

<p><strong>receiving thread part</strong></p>

<pre><code>int nBytes = 0;

while( true ) {
if( socket.isClosed() || !socket.isConnected())
    break;

try {
    nBytes = datin.available();
    byte[] buffer = new byte[nBytes];
    int len = datin.read(buffer, 0, nBytes);
    if( len == -1 )
    break;
    if( buffer.length != 0 ){
    System.out.println("received byte is " + buffer + " with a length of " + buffer.length);
    String s = new String(buffer, 0, buffer.length);
    System.out.println("received string is " + s + " with a length of " + s.length());
    }
} catch (Exception e) {
  break;
 }
</code></pre>

<p><em>result while i executing this code is shown below</em></p>

<pre><code>received byte is [B@4056cf00 with a length of 8
received string is \??T with a length of 6
</code></pre>

<p>how can i solve this problem ?</p>
