code: public void step() throws IOException {
          if (closed) {
              throw new ClosedChannelException();
          }
          if (input.position() == header.length) {
              if (command == null) {
                  command = CommandFactory.create(input);
              }
  
              if (command.complete()) {
                  command.process();
                  protocolHandler.execute(command, this);
                  command = null;
                  input.rewind();
              }
          }
      }
docs: Attempt to process a single command from the input buffer. Note this does
  not actually read from the socket.
  
  @throws IOException if the client has been closed