title: Determine the audio format of an audio file stored in bytearray and play it
body: <p>I have encrypted an audio file (.wav, .midi, .au, .mid) and want to decrypt it and play the audio without storing it to disk. I have a bytearray after decrypting the audio file, and now I have to play it.</p>
  
  <p>My problem is how to <strong>find the audio format</strong> from this resulted bytearray and <strong>play it</strong>.</p>
  
  <pre><code>byteoutput=new byte[(int) fileSize];
  </code></pre>