public void sendError(String message) throws IOException {
  if (buffering && buffer.size() > 0) {
    writeMessage(new ProtocolMessage(buffer));
    buffer.clear();
  }
  writeMessage(new ProtocolNOK(message));
}

public void sendError ( String message ) throws IOException { if ( buffering && buffer . size ( ) > 0 ) { writeMessage ( new ProtocolMessage ( buffer ) ) ; buffer . clear ( ) ; } writeMessage ( new ProtocolNOK ( message ) ) ; }
send an error message back to client .
