AudioInputStream to Buffer
<p>I am working on a web application wherein I am recording sound from my microphone using a <a href="http://www.sajithmr.me/jrecorder/example1.html" rel="nofollow">flash plugin</a>. After the recording I can upload the recorded file to the server. Plz see the code below:</p>

<pre><code>            // Get the input stream
            InputStream is = request.getInputStream();
            InputStream bufferedIn = new BufferedInputStream(is);
            AudioInputStream ais = AudioSystem.getAudioInputStream(bufferedIn);

            // Declare the new format to convert to
            AudioFormat audioFormat =  new AudioFormat(sampleRate, sampleSizeInBits, channels, signed, bigEndian);

            // Convert the format and return the new audio input stream
            ais = AudioSystem.getAudioInputStream(audioFormat, ais);
</code></pre>

<p>Now, after this conversion I want to save the audio data from ais into a buffer and upload it to DB.</p>

<p>How do I do that? Thanks!! :)</p>
