docs: private boolean checkFourLetterWord(final SelectionKey k, final int len)
      throws IOException
      {
          // We take advantage of the limited size of the length to look
          // for cmds. They are all 4-bytes which fits inside of an int
          String cmd = cmd2String.get(len);
          if (cmd == null) {
              return false;
          }
          LOG.info("Processing " + cmd + " command from "
                  + sock.socket().getRemoteSocketAddress());
          packetReceived();
  
          /** cancel the selection key to remove the socket handling
           * from selector. This is to prevent netcat problem wherein
           * netcat immediately closes the sending side after sending the
           * commands and still keeps the receiving channel open.
           * The idea is to remove the selectionkey from the selector
           * so that the selector does not notice the closed read on the
           * socket channel and keep the socket alive to write the data to
           * and makes sure to close the socket after its done writing the data
           */
          if (k != null) {
              try {
                  k.cancel();
              } catch(Exception e) {
                  LOG.error("Error cancelling command selection key ", e);
              }
          }
  
          final PrintWriter pwriter = new PrintWriter(
                  new BufferedWriter(new SendBufferWriter()));
          if (len == ruokCmd) {
              RuokCommand ruok = new RuokCommand(pwriter);
              ruok.start();
              return true;
          } else if (len == getTraceMaskCmd) {
              TraceMaskCommand tmask = new TraceMaskCommand(pwriter);
              tmask.start();
              return true;
          } else if (len == setTraceMaskCmd) {
              int rc = sock.read(incomingBuffer);
              if (rc < 0) {
                  throw new IOException("Read error");
              }
  
              incomingBuffer.flip();
              long traceMask = incomingBuffer.getLong();
              ZooTrace.setTextTraceLevel(traceMask);
              SetTraceMaskCommand setMask = new SetTraceMaskCommand(pwriter, traceMask);
              setMask.start();
              return true;
          } else if (len == enviCmd) {
              EnvCommand env = new EnvCommand(pwriter);
              env.start();
              return true;
          } else if (len == confCmd) {
              ConfCommand ccmd = new ConfCommand(pwriter);
              ccmd.start();
              return true;
          } else if (len == srstCmd) {
              StatResetCommand strst = new StatResetCommand(pwriter);
              strst.start();
              return true;
          } else if (len == crstCmd) {
              CnxnStatResetCommand crst = new CnxnStatResetCommand(pwriter);
              crst.start();
              return true;
          } else if (len == dumpCmd) {
              DumpCommand dump = new DumpCommand(pwriter);
              dump.start();
              return true;
          } else if (len == statCmd || len == srvrCmd) {
              StatCommand stat = new StatCommand(pwriter, len);
              stat.start();
              return true;
          } else if (len == consCmd) {
              ConsCommand cons = new ConsCommand(pwriter);
              cons.start();
              return true;
          } else if (len == wchpCmd || len == wchcCmd || len == wchsCmd) {
              WatchCommand wcmd = new WatchCommand(pwriter, len);
              wcmd.start();
              return true;
          }
          return false;
      }