Package com.svanloon.common.util

Examples of com.svanloon.common.util.UrlUtil


   * @throws UnsupportedAudioFileException
   * @throws LineUnavailableException
   *
   */
  public void play(String fileName) throws UnsupportedAudioFileException, IOException, LineUnavailableException {
    URL url = new UrlUtil().getUrl(fileName);
    AudioInputStream stream = AudioSystem.getAudioInputStream(url);     
    AudioFormat format = stream.getFormat();
    DataLine.Info info = new DataLine.Info(Clip.class, format);     
    Clip clip = (Clip) AudioSystem.getLine(info);        
    clip.open(stream);     
View Full Code Here

TOP

Related Classes of com.svanloon.common.util.UrlUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.