java dataoutput stream sending more bytes
<p>I have one server listening on port and ip and a client which will connect to this server.</p>

<pre><code>DataInputStream meterin=new DataInputStream(socket.getInputStream);
DataOutputStream modemds=new DataOutputStream(modems.getOutputStream);
</code></pre>

<p>now server is sending some data here:(CA F0 00 00 00 00 00 00 00 3A).But when I read this as</p>

<pre><code>int c;
byte bt[]=new byte[11]
c=meterin.read(bt,0,11)`
System.out.println("bytes"+c)  // it is returning 10 bytes

modemds.write(bt,0,c)
</code></pre>

<p>but at client i am getting.
(CA F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00).
which is more than 10 bytes even it is reading 10 bytes upwards.</p>
