code: private static void checkInputFile(File file) throws FileNotFoundException, ApkCreationException {
          if (file.isDirectory()) {
              throw new ApkCreationException("%s is a directory!", file);
          }
  
          if (file.exists()) {
              if (!file.canRead()) {
                  throw new ApkCreationException("Cannot read %s", file);
              }
          } else {
              throw new FileNotFoundException(String.format("%s does not exist", file));
          }
      }
docs: Checks an input {@link File} object.
  This checks the following:
  - the file is not an existing directory.
  - that the file exists (if <var>throwIfDoesntExist</var> is <code>false</code>) and can
  be read.
  @param file the File to check
  @throws FileNotFoundException if the file is not here.
  @throws ApkCreationException If the file is a folder or a file that cannot be read.