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

Constructor Index

 o MediaLocator(String)
 o MediaLocator(URL)

Method Index

 o getProtocol()
Get the beginning of the locator string up to but not including the first colon.
 o getRemainder()
Get the MediaLocator string with the protocol removed.
 o getURL()
Get the URL associated with this MediaLocator.
 o toExternalForm()
Create a string from the URL argument that can be used to construct the MediaLocator.
 o toString()
Used for printing MediaLocators.

Constructors

 o MediaLocator
 public MediaLocator(URL url)
Parameters:
url - The URL to construct this media locator from.
 o MediaLocator
 public MediaLocator(String locatorString)

Methods

 o getURL
 public URL getURL() throws MalformedURLException
Get the URL associated with this MediaLocator.

 o 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.
 o getRemainder
 public String getRemainder()
Get the MediaLocator string with the protocol removed.

Returns:
The argument string.
 o toString
 public String toString()
Used for printing MediaLocators.

Returns:
A string for printing MediaLocators.
Overrides:
toString in class Object
 o 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