com.huguesjohnson.tiamat.audio
Class AudioPlayerFactory

java.lang.Object
  extended by com.huguesjohnson.tiamat.audio.AudioPlayerFactory

public abstract class AudioPlayerFactory
extends java.lang.Object

AudioPlayerFactory - Abstract factory to select an appropriate AudioPlayer for a given file

Author:
Hugues Johnson

Constructor Summary
AudioPlayerFactory()
           
 
Method Summary
static AudioPlayer getAudioPlayerFor(java.lang.String path)
          Chooses an appropriate AudioPlayer for the given file, throws UnsupportedAudioFormatException if one can not be found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioPlayerFactory

public AudioPlayerFactory()
Method Detail

getAudioPlayerFor

public static final AudioPlayer getAudioPlayerFor(java.lang.String path)
                                           throws UnsupportedAudioFormatException
Chooses an appropriate AudioPlayer for the given file, throws UnsupportedAudioFormatException if one can not be found.

Parameters:
path - The full path of the file to play.
Returns:
An instance of AudioPlayer that can play the file.
Throws:
UnsupportedAudioFormatException - If an AudioPlayer can not be found for the file.


Copyright © 2004-2006 Hugues Johnson