docs: @Override
      public AuditUtilityReturnCodes handleTask(ConsoleWrapper stdin, PrintStream stdout, PrintStream stderr, String[] args) throws Exception {
  
          Map<String, String> argMap = parseArgumentList(args);
          Map<String, String> props = convertToProperties(argMap);
  
          if (props.isEmpty()) {
              throw new IllegalArgumentException(getMessage("insufficientArgs"));
          }
  
          if (isDebug) {
              Handler[] handlers = Logger.getLogger("").getHandlers();
              for (int index = 0; index < handlers.length; index++) {
                  handlers[index].setLevel(Level.FINE);
              }
              theLogger.setLevel(Level.FINE);
          }
  
          if (isDebug) {
              theLogger.fine("Arguments passed in: " + argMap.toString());
          }
  
          // validate that the --encrypted argument value, if specified, is either true or false
          if (argMap.containsKey(ARG_ENCRYPTED) && (!argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("true") && (!argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("false")))) {
              if (isDebug)
                  theLogger.fine("Invalid value, " + argMap.get(ARG_ENCRYPTED) + ", specified for the --encrypted argument.   Value must be either true or false.");
              throw new IllegalArgumentException(getMessage("invalidValue", argMap.get(ARG_ENCRYPTED), ARG_ENCRYPTED));
          }
  
          // validate that the --signed argument value, if specified,  is either true or false
          if (argMap.containsKey(ARG_SIGNED) && (!argMap.get(ARG_SIGNED).equalsIgnoreCase("true") && (!argMap.get(ARG_SIGNED).equalsIgnoreCase("false")))) {
              if (isDebug)
                  theLogger.fine("Invalid value, " + argMap.get(ARG_SIGNED) + ", specified for the --signed argument.   Value must be either true or false.");
              throw new IllegalArgumentException(getMessage("invalidValue", argMap.get(ARG_SIGNED), ARG_SIGNED));
          }
  
          // if --encrypted=true, ensure the keystore type specified for the encryption keystore is not CMS or PKCS11
          if (argMap.containsKey(ARG_ENCRYPTED) && argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("true") && (argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_TYPE))) {
              if (argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE).equalsIgnoreCase("PKCS11") || argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE).equals("CMS")) {
                  if (isDebug)
                      theLogger.fine("The keystore type, " + argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE)
                                     + ", specified for --encKeyStoreType is not supported. Only JKS, JCEKS and PKCS12 are supported.");
                  throw new IllegalArgumentException(getMessage("security.audit.UnsupportedKeyStoreType", argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE), ARG_ENCRYPTION_KEYSTORE_TYPE));
              }
          }
  
          // if --signed=true, ensure the keystore type specified for the signing keystore is not CMS or PKCS11
          if (argMap.containsKey(ARG_SIGNED) && argMap.get(ARG_SIGNED).equalsIgnoreCase("true") && (argMap.containsKey(ARG_SIGNING_KEYSTORE_TYPE))) {
              if (argMap.get(ARG_SIGNING_KEYSTORE_TYPE).equalsIgnoreCase("PKCS11") || argMap.get(ARG_SIGNING_KEYSTORE_TYPE).equals("CMS")) {
                  if (isDebug)
                      theLogger.fine("The keystore type, " + argMap.get(ARG_SIGNING_KEYSTORE_TYPE)
                                     + ", specified for --signingKeyStoreType is not supported. Only JKS, JCEKS and PKCS12 are supported.");
                  throw new IllegalArgumentException(getMessage("security.audit.UnsupportedKeyStoreType", argMap.get(ARG_SIGNING_KEYSTORE_TYPE), ARG_SIGNING_KEYSTORE_TYPE));
              }
          }
  
          // ensure the --auditFileLocation is specified (required argument)
          if (!argMap.containsKey(ARG_AUDIT_FILE_LOCATION)) {
              if (isDebug)
                  theLogger.fine("Missing --auditFileLocation argument");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_AUDIT_FILE_LOCATION));
          }
  
          // ensure the audit log specified in the --auditFileLocation argument exists
          if (argMap.containsKey(ARG_AUDIT_FILE_LOCATION)) {
              String afl = argMap.get(ARG_AUDIT_FILE_LOCATION);
              File f = new File(afl);
              if (!f.exists()) {
                  if (isDebug)
                      theLogger.fine("Specified location for the audit log does not exist");
                  throw new IllegalArgumentException(getMessage("security.audit.FileNotFound", afl));
              }
          }
  
          // ensure the --outputFileLocation is specified (required argument)
          if (!argMap.containsKey(ARG_OUTPUT_FILE_LOCATION)) {
              if (isDebug)
                  theLogger.fine("Missing --outputFileLocation argument");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_OUTPUT_FILE_LOCATION));
          }
  
          // check that the location of the audit log is not the same as the location of the output log
          if (argMap.get(ARG_AUDIT_FILE_LOCATION).equals(argMap.get(ARG_OUTPUT_FILE_LOCATION))) {
              if (isDebug)
                  theLogger.fine("The input audit file location, " + argMap.get(ARG_AUDIT_FILE_LOCATION) +
                                 ", cannot be the same as the output audit file location, " + argMap.get(ARG_OUTPUT_FILE_LOCATION) + ".");
              throw new IllegalArgumentException(getMessage("invalidFileLocations", argMap.get(ARG_AUDIT_FILE_LOCATION), argMap.get(ARG_OUTPUT_FILE_LOCATION)));
          }
  
          // check that the output file location specified is not a directory
          if (argMap.containsKey(ARG_OUTPUT_FILE_LOCATION)) {
              String afl = argMap.get(ARG_OUTPUT_FILE_LOCATION);
              File f = new File(afl);
              if (f.isDirectory()) {
                  if (isDebug)
                      theLogger.fine("Specified location for the output audit log does not exist.  It is specified but is a directory.");
                  throw new IllegalArgumentException(getMessage("security.audit.FileNotFound", afl));
              } else {
                  if (isDebug)
                      theLogger.fine("Specified location for the output audit log exists and is not a directory.");
  
              }
  
              if (afl.endsWith("/") || afl.endsWith("\\")) {
                  if (isDebug)
                      theLogger.fine("Specified location for the output audit log does not exist.  It is specified but is a non existant directory.");
                  throw new IllegalArgumentException(getMessage("security.audit.FileNotFound", afl));
              }
  
              if (f.createNewFile()) {
                  if (!f.canWrite()) {
                      if (isDebug)
                          theLogger.fine("Specified location for the output audit log is a non-writable file.  Ensure that the location for the output file is writable");
                      throw new IllegalArgumentException(getMessage("audit.NonWriteableOuputFile", afl));
                  }
              }
              boolean fd = false;
              if (f.exists() && f.canWrite())
                  fd = f.delete();
          }
  
          // if --encrypted=true, ensure that the encryption keystore password is specified.
          if (argMap.containsKey(ARG_ENCRYPTED) && argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("true") &&
              !argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_PASSWORD)) {
              if (isDebug)
                  theLogger.fine("The --encrypted argument is true, but nothing was specified for --encKeyStorePassword.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_ENCRYPTION_KEYSTORE_PASSWORD));
          }
  
          // if --encrypted=true, ensure that the encryption keystore type is specified.
          if (argMap.containsKey(ARG_ENCRYPTED) && argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("true") &&
              !argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_TYPE)) {
              if (isDebug)
                  theLogger.fine("The --encrypted argument is true, but nothing was specified for --encKeyStoreType.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_ENCRYPTION_KEYSTORE_TYPE));
          }
  
          // if --encrypted=true, and an encryption keystore location is specified, ensure it 1) has a URL prefix, 2) exists,  and 3) is not CMS or PKCS11
          if (argMap.containsKey(ARG_ENCRYPTED) && argMap.get(ARG_ENCRYPTED).equalsIgnoreCase("true") &&
              argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_LOCATION)) {
              String loc = argMap.get(ARG_ENCRYPTION_KEYSTORE_LOCATION);
              File f = new File(loc);
              if (!f.exists()) {
                  if (isDebug)
                      theLogger.fine("Specified location for the encryption keystore does not exist");
                  throw new IllegalArgumentException(getMessage("security.audit.FileNotFound", loc));
  
              }
              if (loc.endsWith(".CMS") || loc.endsWith(".cms") || loc.endsWith(".pkce11") || loc.endsWith(".PKCE11")) {
                  if (isDebug)
                      theLogger.fine("The keystore type, " + argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE)
                                     + ", specified for --encKeyStoreType is not supported. Only JKS, JCEKS and PKCS12 are supported.");
                  throw new IllegalArgumentException(getMessage("security.audit.UnsupportedKeyStoreType", argMap.get(ARG_ENCRYPTION_KEYSTORE_TYPE), ARG_ENCRYPTION_KEYSTORE_TYPE));
              }
          }
  
          // if --signed=true, ensure that the signing keystore password is specified.
          if (argMap.containsKey(ARG_SIGNED) && argMap.get(ARG_SIGNED).equalsIgnoreCase("true") &&
              !argMap.containsKey(ARG_SIGNING_KEYSTORE_PASSWORD)) {
              if (isDebug)
                  theLogger.fine("The --signed argument is true, but nothing was specified for --signingKeyStorePassword.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_SIGNING_KEYSTORE_PASSWORD));
          }
  
          // if --signed=true, ensure that the signing keystore type is specified.
          if (argMap.containsKey(ARG_SIGNED) && argMap.get(ARG_SIGNED).equalsIgnoreCase("true") &&
              !argMap.containsKey(ARG_SIGNING_KEYSTORE_TYPE)) {
              if (isDebug)
                  theLogger.fine("The --signed argument is true, but nothing was specified for --signingKeyStoreType.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_SIGNING_KEYSTORE_TYPE));
          }
  
          // if --signed=true, and a signed keystore location is specified, ensure it 1) has a URL prefix, 2) exists,  and 3) is not CMS or PKCS11
          if (argMap.containsKey(ARG_SIGNED) && argMap.get(ARG_SIGNED).equalsIgnoreCase("true") &&
              argMap.containsKey(ARG_SIGNING_KEYSTORE_LOCATION)) {
              String loc = argMap.get(ARG_SIGNING_KEYSTORE_LOCATION);
              File f = new File(loc);
              if (!f.exists()) {
                  if (isDebug)
                      theLogger.fine("Specified location for the signing keystore does not exist");
                  throw new IllegalArgumentException(getMessage("security.audit.FileNotFound", loc));
  
              }
              if (loc.endsWith(".CMS") || loc.endsWith(".cms") || loc.endsWith(".pkce11") || loc.endsWith(".PKCE11")) {
                  if (isDebug)
                      theLogger.fine("The keystore type, " + argMap.get(ARG_SIGNING_KEYSTORE_TYPE)
                                     + ", specified for --signingKeyStoreType is not supported. Only JKS, JCEKS and PKCS12 are supported.");
                  throw new IllegalArgumentException(getMessage("security.audit.UnsupportedKeyStoreType", argMap.get(ARG_SIGNING_KEYSTORE_TYPE), ARG_SIGNING_KEYSTORE_TYPE));
              }
          }
  
          if ((argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_PASSWORD) || argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_TYPE) ||
               argMap.containsKey(ARG_ENCRYPTION_KEYSTORE_LOCATION))
              && (!argMap.containsKey(ARG_ENCRYPTED))) {
              if (isDebug)
                  theLogger.fine("The --encKeyStoreLocation, --encKeyStoreType, and --encKeyStorePassword were specified, but nothing was specified for the --encrypted argument.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_ENCRYPTED));
          }
  
          if ((argMap.containsKey(ARG_SIGNING_KEYSTORE_PASSWORD) || argMap.containsKey(ARG_SIGNING_KEYSTORE_TYPE) ||
               argMap.containsKey(ARG_SIGNING_KEYSTORE_LOCATION))
              && (!argMap.containsKey(ARG_SIGNED))) {
              if (isDebug)
                  theLogger.fine("The --signingKeyStoreLocation, --signingKeyStoreType, and --signingKeyStorePassword were specified, but nothing was specified for the --signed argument.");
              throw new IllegalArgumentException(getMessage("missingArg", ARG_SIGNED));
          }
  
          try {
              auditReader(stderr, props);
          } catch (Exception e) {
              throw e;
          }
  
          return AuditUtilityReturnCodes.OK;
      }