void sendBufferIfNotEmpty() throws IOException {
  if (buf != null && buf.position() > 0)   sendBuffer();
}

void sendBufferIfNotEmpty ( ) throws IOException { if ( buf != null && buf . position ( ) > 0 ) sendBuffer ( ) ; }
send local buffer if at least something is stored there .
