Class FilenameURL

  extended by paulscode.sound.FilenameURL

public class FilenameURL
extends java.lang.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:
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

Constructor Summary
FilenameURL(java.lang.String filename)
          Constructor: Saves a handle to the filename (used later to generate a URL instance).
FilenameURL( url, java.lang.String identifier)
          Constructor: Saves handles to the url and identifier.
Method Summary
 java.lang.String getFilename()
          Returns the filename/identifier. getURL()
          Returns the URL interface to the file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FilenameURL( url,
                   java.lang.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.

url - URL interface to a file.
identifier - Identifier (filename) for the file.


public FilenameURL(java.lang.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.

filename - Name of the file.
Method Detail


public java.lang.String getFilename()
Returns the filename/identifier.

Filename or identifier for the file.


public 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.

URL interface to the file.