Class FilenameURL

java.lang.Object
com.ardor3d.audio.FilenameURL

public class FilenameURL extends Object
The FilenameURL class is designed to associate a String filename/identifier with a URL. Handles either case where user supplies a String path or user supplies a URL instance.

SoundSystem License:

You are free to use this library for any purpose, commercial or otherwise. You may modify this library or source code, and distribute it any way you like, provided the following conditions are met:
1) You may not falsely claim to be the author of this library or any unmodified portion of it.
2) You may not copyright this library or a modified version of it and then sue me for copyright infringement.
3) If you modify the source code, you must clearly document the changes made before redistributing the modified source code, so other users know it is not the original code.
4) You are not required to give me credit for this library in any derived work, but if you do, you must also mention my website: http://www.paulscode.com
5) I the author will not be responsible for any damages (physical, financial, or otherwise) caused by the use if this library or any part of it.
6) I the author do not guarantee, warrant, or make any representations, either expressed or implied, regarding the use of this library or any part of it.

Author: Paul Lamb
http://www.paulscode.com
  • Constructor Details

    • FilenameURL

      public FilenameURL(URL url, String identifier)
      Constructor: Saves handles to the url and identifier. The identifier should look like a filename, and it must have the correct extension so SoundSystem knows what format to use for the file referenced by the URL instance.
      Parameters:
      url - URL interface to a file.
      identifier - Identifier (filename) for the file.
    • FilenameURL

      public FilenameURL(String filename)
      Constructor: Saves a handle to the filename (used later to generate a URL instance). The file may either be located within the JAR or at an online location. If the file is online, filename must begin with "http://", since that is how SoundSystem recognizes URL names.
      Parameters:
      filename - Name of the file.
  • Method Details

    • getFilename

      public String getFilename()
      Returns the filename/identifier.
      Returns:
      Filename or identifier for the file.
    • getURL

      public URL getURL()
      Returns the URL interface to the file. If a URL was not originally specified in the constructor, then the first time this method is called it creates a URL instance using the previously specified filename.
      Returns:
      URL interface to the file.