From http://stackoverflow.com/questions/26305/how-can-i-play-sound-in-java
Is it possible to have resouce leakage for the following code? Who will be responsible to close the audio stream?
public static void playAlertSound() {
new Thread(new Runnable() {
@Override
public void run() {
try {
Clip clip = AudioSystem.getClip();
AudioInputStream inputStream = AudioSystem.getAudioInputStream(Utils.class.getResourceAsStream("/sounds/door_bell.wav"));
clip.open(inputStream);
clip.start();
} catch (Exception e) {
log.error(null, e);
}
}
}).start();
}