code: public boolean sendCommand(String command) {
          if (writer != null) {
              try {
                  logger.info("Sending command " + command + " to remote host " + remoteHost);
                  writer.write(command);
                  writer.write('\r');
                  writer.flush();
              } catch (IOException e) {
                  logger.fatal("Error while sending command " + command + " to remote host " + remoteHost, e);
                  return false;
              }
              return true;
          } else {
              return false;
          }
      }
docs: Send the specified command to the remote host
  
  @param command command line, without terminating character
  @return true if success, false otherwise