title: How to check existence of a JAR file and a specific file inside JAR?
body: <p>Assume the file name is in this URL:</p>
  
  <pre><code>URL file = new URL("jar:file:/path/to/foo.jar!/META-INF/file.txt");
  </code></pre>
  
  <p>This operation leads to <code>IOException</code> if there is no <code>foo.jar</code> or there is no <code>file.txt</code> inside the existing jar:</p>
  
  <pre><code>import org.apache.commons.io.FileUtils;
  FileUtils.copyURLToFile(file, /* some other file */);
  </code></pre>
  
  <p>Is it possible to validate file existence without exception catching?</p>