flac_to_mp3 is currently relying on shntool to find the precise length of an audio file.
It appears that Java AudioFile supports getPreciseLength, which might be suitable instead. This will provide a much better API internally since shntool's text output won't have to be parsed, and will remove the requirement of an external tool.