code: public static void checkFileToBeRead(File archive, String fileDesc) throws IllegalArgumentException
      {
          if (archive == null)
              throw new IllegalArgumentException(fileDesc + " must not be null.");
          if (!archive.exists())
              throw new IllegalArgumentException(fileDesc + " does not exist: " + archive.getAbsolutePath());
          if (archive.isDirectory())
              throw new IllegalArgumentException(fileDesc + " is a directory, expected a file: " + archive.getPath());
      }
docs: --- Input validating methods. ---