title: Android: OutputStreamWriter didn't send the data after flush (socket)
body: <pre><code>OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
  
  out.write(data);
  out.flush();
  </code></pre>
  
  <p>sock - Socket; data - buffer of chars;</p>
  
  <p>So, if I wouldn't close the "out", or "sock" then there is no data will be sent to server.</p>
  
  <pre><code>OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
  
  out.write(data);
  out.close();
  </code></pre>
  
  <p>Is fine. But why?</p>