private void handleCommand(StringBuilder commandBuffer, int parameter, boolean hasParameter) throws IOException
   {
      String commandName = commandBuffer.toString();
      Command command = Command.getInstance(commandName);

      //
      // Note that we silently ignore commands that we don't recognise
      //
      if (command != null)
      {
         if (command != Command.hex)
         {
            handleCharacterData();
         }

         switch (command)
         {
            case bin:
            {
               handleBinaryData(parameter);
               break;
            }

            case hex:
            {
               parsingHex = true;
               break;
            }

            default:
            {
               listener.processCommand(command, parameter, hasParameter, false);
               break;
            }
         }
      }
   }