Convert FFT to java