title: Java File and ByteArray or InputStream
body: <p>I want to use jFugue to play some MIDI music in an applet. There's a class for the MIDI pattern - <code>Pattern</code> - and the only method to load the pattern is from a File. Now, I don't know how applets load files and what not, but I am using a framework (PulpCore) that makes loading assets a simple task. If I need to grab an asset from a ZIP catalogue, I can use the <code>Assets</code> class which provides <code>get()</code> and <code>getAsStream()</code> methods. <code>get()</code> returns the given asset as a <code>ByteArray</code>, the other as an <code>InputStream</code>.</p>
  
  <p>I need jFugue to load the pattern from either <code>ByteArray</code> or <code>InputStream</code>.
  In pseudo-code, I would like to do this:</p>
  
  <pre><code>Pattern.load(new File(Assets.get("mymidifile.midi")));
  </code></pre>
  
  <p>However there is no File constructor that would take a ByteArray. Suggestions, please?</p>