title: Convert PCM raw bytes to WAV bytes
body: <p>I am listening to live phone calls and am able to get the raw PCM bytes.
  I also able to listen to these bytes through java's audio api.
  These all works on an applet.</p>
  
  <p>Now I want to be able to convert the raw PCM bytes of the phone call to WAV bytes so I could write it directly to a ServletOutputStream. This would allow browsers to actually listen to the phone calls.</p>
  
  <p>Does anybody have any idea how I would be able to convert, on the fly, some raw PCM bytes[] to WAV bytes[]?</p>
  
  <p>The examples I've seen all pertain to converting a file to another file.</p>
  
  <p><a href="https://stackoverflow.com/questions/4440015/java-pcm-to-wav">java pcm to wav</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5810164/how-can-i-write-wav-file-from-byte-array-in-java">How can I write a WAV file from byte array in java?</a></p>
  
  <p>Thank you.</p>