List of utility methods to do File Write via ByteBuffer
void | writeWaveFile44100_16Bit_Mono(short[] data, File file) write Wave Fil Bi Mono final ByteBuffer buffer = ByteBuffer.allocate(data.length * 2).order(ByteOrder.LITTLE_ENDIAN); buffer.asShortBuffer().put(data).position(0); try { final FileOutputStream os = new FileOutputStream(file); final ByteBuffer converter = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN); os.write((byte) 'R'); os.write((byte) 'I'); os.write((byte) 'F'); ... |