tags:

views:

856

answers:

1

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?

+2  A: 

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

Bill James