code: protected void assertExtractSource(File archive) throws FileNotFoundException, IllegalArgumentException {
          if (archive.isDirectory()) {
              throw new IllegalArgumentException("Can not extract " + archive + ". Source is a directory.");
          } else if (!archive.exists()) {
              throw new FileNotFoundException(archive.getPath());
          } else if (!archive.canRead()) {
              throw new IllegalArgumentException("Can not extract " + archive + ". Can not read from source.");
          }
      }
docs: Asserts that the given File object is a readable file that can be used to extract from.
  
  @param archive the file to check
  @throws FileNotFoundException if the file does not exist
  @throws IllegalArgumentException if the file is a directory or not readable