public final byte[] write() {
final ByteArrayWriter writer = new ByteArrayWriter(WAVE_HEADER_BYTES);
writer.writeString(cRIFFHeader, 4, "US-ASCII");
writer.writeUnsignedInt(nRIFFBytes);
writer.writeString(cDataTypeID, 4, "US-ASCII");
writer.writeString(cFormatHeader, 4, "US-ASCII");
writer.writeUnsignedInt(nFormatBytes);
writer.writeUnsignedShort(nFormatTag);
writer.writeUnsignedShort(nChannels);
writer.writeUnsignedInt(nSamplesPerSec);
writer.writeUnsignedInt(nAvgBytesPerSec);