private static AudioInputStream openStream ( Media media ) throws IOException { try { return AudioSystem . getAudioInputStream ( media . getInputStream ( ) ) ; } catch ( final UnsupportedAudioFileException exception ) { throw new IOException ( ERROR_PLAY_SOUND + media . getPath ( ) , exception ) ; } }
Open the audio stream and prepare it .