private void sendBuffer() throws IOException {
  buf.flip();
  send(buf,buf.remaining());
  buf=null;
}

private void sendBuffer ( ) throws IOException { buf . flip ( ) ; send ( buf , buf . remaining ( ) ) ; buf = null ; }
send all local - buffered data to server .
