title: Open file; try filesystem first, then JARs
body: <p>I'm trying to have my application load a resource (binary file) transparently:</p>
  
  <p>If the file exists under the current directory, open it.<br>
  If not, try looking in the current JAR file if applicable.<br>
  If not, try looking in other JAR files. (This is optional and I don't mind explicitly specifying which JAR files.)</p>
  
  <p>So far I know of <code>File</code> which opens a local file and <code>ClassLoader</code> which has <code>getResource*</code> for JAR contents.</p>
  
  <p>Is there a class which combines the two? If not, how should I go about writing it myself? Should I write a <code>ClassLoader</code> which also checks the local filesystem? Using <code>File</code>? (I'm very unfamiliar with Java and don't even know what's a good type to return. <code>InputStream</code>?)</p>
  
  <p>Thanks</p>
  
  <p>P.S. By "file" I mean "path", e.g. "data/texture1.png".</p>