title: problem with writing large data using java nio socket channel
body: <p>I can sent small data using java nio.</p>
  
  <p>But If I want to send a very large data then my socket channel did not work fine.</p>
  
  <pre><code>message = "very large data"+"\n";
  ByteBuffer buf = ByteBuffer.wrap(message.getBytes());
  int nbytes = channel.write(buf);
  </code></pre>
  
  <p>all the data is sent.</p>
  
  <p>I want to read data from server so i am using BufferedInputStreaReader.readLine();
  In this case I am not getting any error also i cannot retrieve any of the data that i have sent</p>
  
  <p>Thanks
  Deepak</p>