org.xith3d.loaders.sound.impl.wav
Class WaveLoader

java.lang.Object
  extended by org.xith3d.loaders.sound.SoundLoader
      extended by org.xith3d.loaders.sound.impl.wav.WaveLoader

public class WaveLoader
extends SoundLoader

This is a SoundLoader implementation for Wave sounds (.wav).


Field Summary
static java.lang.String DEFAULT_EXTENSION
          The default extension to assume for Wave files.
 
Constructor Summary
WaveLoader()
           
 
Method Summary
static WaveLoader getInstance()
           
 WaveSoundContainer loadSound(java.io.InputStream in)
          This method loads the Sound from an InputStream.
 WaveSoundContainer loadSound(java.lang.String filename)
          This method loads the Sound from a file.
 WaveSoundContainer loadSound(java.net.URL url)
          This method loads the Sound from a URL.
 
Methods inherited from class org.xith3d.loaders.sound.SoundLoader
loadBackgroundSound, loadBackgroundSound, loadBackgroundSound, loadPointSound, loadPointSound, loadPointSound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXTENSION

public static final java.lang.String DEFAULT_EXTENSION
The default extension to assume for Wave files.

See Also:
Constant Field Values
Constructor Detail

WaveLoader

public WaveLoader()
Method Detail

getInstance

public static WaveLoader getInstance()
Returns:
the WaveLoader instance to use as singleton.

loadSound

public WaveSoundContainer loadSound(java.io.InputStream in)
                             throws java.io.IOException
This method loads the Sound from an InputStream.

Specified by:
loadSound in class SoundLoader
Parameters:
in - the InputStream to load the Sound from. It isn't necessary to explicitly pass an instance of BufferedInputStream, since it is created on demand.
Throws:
java.io.IOException

loadSound

public WaveSoundContainer loadSound(java.net.URL url)
                             throws java.io.IOException
This method loads the Sound from a URL.

Specified by:
loadSound in class SoundLoader
Parameters:
url - the URL to load the Sound from.
Throws:
java.io.IOException

loadSound

public WaveSoundContainer loadSound(java.lang.String filename)
                             throws java.io.IOException
This method loads the Sound from a file.

Specified by:
loadSound in class SoundLoader
Parameters:
filename - the file's name to load the Sound from.
Throws:
java.io.IOException