How can I write a short array to a DataOutputStream?
<p>Currently I am writing an array of shorts to a DataOutputStream as follows:</p>

<pre><code>for (int i = 0; i &lt; samplesRead; i++)
{
   dos.writeShort(audioBuffer[i]);
}
</code></pre>

<p>Is there a way to do it one swoop as opposed per each element?</p>

<p>Thanks</p>