All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.MediaLocator
java.lang.Object
|
+----javax.media.MediaLocator
- public class MediaLocator
- extends Object
MediaLocator describes the location of
media content. MediaLocator is closely
related to URL. URLs
can be obtained from MediaLocators, and
MediaLocators can be constructed from
URL.
Unlike a URL, a MediaLocator
can be instanced without a URLStreamHandler
installed on the System.
- Version:
- 1.8, 97/08/25.
- See Also:
- URL, URLStreamHandler
-
MediaLocator(String)
-
-
MediaLocator(URL)
-
-
getProtocol()
- Get the beginning of the locator string
up to but not including the first colon.
-
getRemainder()
- Get the
MediaLocator string with the protocol removed.
-
getURL()
- Get the
URL associated with this MediaLocator.
-
toExternalForm()
- Create a string from the
URL argument that can
be used to construct the MediaLocator.
-
toString()
- Used for printing
MediaLocators.
MediaLocator
public MediaLocator(URL url)
- Parameters:
- url - The
URL to construct this media locator from.
MediaLocator
public MediaLocator(String locatorString)
getURL
public URL getURL() throws MalformedURLException
- Get the
URL associated with this MediaLocator.
getProtocol
public String getProtocol()
- Get the beginning of the locator string
up to but not including the first colon.
- Returns:
- The protocol for this
MediaLocator.
getRemainder
public String getRemainder()
- Get the
MediaLocator string with the protocol removed.
- Returns:
- The argument string.
toString
public String toString()
- Used for printing
MediaLocators.
- Returns:
- A string for printing
MediaLocators.
- Overrides:
- toString in class Object
toExternalForm
public String toExternalForm()
- Create a string from the
URL argument that can
be used to construct the MediaLocator.
- Returns:
- A string for the
MediaLocator.
All Packages Class Hierarchy This Package Previous Next Index