Are you sure the audio file is in valid format? The exception normally means that java can't interpret the data read form the file as valid audio data.
Are you sure the settings you provide with ULAW_FORMAT
are correct?
I'm not familiar with µ-law encoding but are the values for frameSize
and frameRate
correct?
You could also try
AudioSystem.getAudioInputStream(AudioFormat.Encoding.ULAW, inputFileStream);
If that too doesn't work either the file has invalid audio data or java has some parsing bug.