This question already has an answer here:
I have a web service that returns an array of bytes and my intention is to convert said array to a .wav in the client (a handheld such as Blackberry). However I really have no idea of how to do that, I tried just making an FileOutputStream but of course that wouldn't play. So I am once again without knowing what to do. Any ideas?
So, there are LOTS of .WAV formats, here's some documentation:
It's not just a stream of data bytes, but it's close... Just a bit of header and you should be good.
I suppose you could also use something like http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/sampled/spi/AudioFileWriter.html