Locator which refers to a
URI.
| Modifier and Type | Class and Description |
|---|---|
| private static class | Locator.
Holds connection and response code returned from getConnection() |
| Modifier and Type | Field and Description |
|---|---|
| private LocatorCache. | |
| private boolean | |
| private static final long | CONNECTION_RETRY_INTERVAL
The number of milliseconds between attempts to open a URL connection. |
| private static final int | CONNECTION_TIMEOUT
Timeout in milliseconds to wait for connection (5 min). |
| private Map | connectionProperties
Properties to be associated with the connection made to the URI. |
| protected long | contentLength
A hint for the internal player. |
| protected String | contentType
The content type of the media content. |
| public static final String | DEFAULT_CONTENT_TYPE
The content type used if no more specific one may be derived. |
| private boolean | isIpod
iOS only: determines if the given URL points to the iPod library |
| private static final int | MAX_CONNECTION_ATTEMPTS
The number of times to attempt to open a URL connection to test the URI. |
| private final Object | propertyLock
Mutex for connectionProperties; |
| private String | |
| private CountDownLatch | |
| private String | |
| protected URI | uri
The URI source. |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| pack-priv static void | |
| public ConnectionHolder | |
| public ConnectionHolder | |
| private Locator. | |
| public long | Returns: size of the media file in bytes. -1 indicates unknown, which may happen with network streams.Retrieves the media size. |
| private static long | |
| public String | getContentType()
Retrieves the content type describing the media content or
|
| private String | |
| private InputStream | |
| public String | |
| public String | |
| public URI | |
| public void | |
| public void | setConnectionProperty(String
The name of the property. property, Object The value of the property. value)Sets a property to be used by the connection to the media specified by the URI. |
| public String | Returns: TheLocatorURI as a
String.Overrides java. Retrieves a string representation of the
|
| public void |
| cacheEntry | back to summary |
|---|---|
| private LocatorCache. | |
| canBlock | back to summary |
|---|---|
| private boolean canBlock | |
| CONNECTION_RETRY_INTERVAL | back to summary |
|---|---|
| private static final long CONNECTION_RETRY_INTERVAL The number of milliseconds between attempts to open a URL connection. | |
| CONNECTION_TIMEOUT | back to summary |
|---|---|
| private static final int CONNECTION_TIMEOUT Timeout in milliseconds to wait for connection (5 min). | |
| connectionProperties | back to summary |
|---|---|
| private Map<String, Object> connectionProperties Properties to be associated with the connection made to the URI. The significance of the properties depends on the URI protocol and type of media source. | |
| contentLength | back to summary |
|---|---|
| protected long contentLength A hint for the internal player. | |
| contentType | back to summary |
|---|---|
| protected String contentType The content type of the media content. | |
| DEFAULT_CONTENT_TYPE | back to summary |
|---|---|
| public static final String DEFAULT_CONTENT_TYPE The content type used if no more specific one may be derived. | |
| isIpod | back to summary |
|---|---|
| private boolean isIpod iOS only: determines if the given URL points to the iPod library | |
| MAX_CONNECTION_ATTEMPTS | back to summary |
|---|---|
| private static final int MAX_CONNECTION_ATTEMPTS The number of times to attempt to open a URL connection to test the URI. | |
| propertyLock | back to summary |
|---|---|
| private final Object propertyLock Mutex for connectionProperties; | |
| protocol | back to summary |
|---|---|
| private String protocol | |
| readySignal | back to summary |
|---|---|
| private CountDownLatch readySignal | |
| scheme | back to summary |
|---|---|
| private String scheme | |
| uri | back to summary |
|---|---|
| protected URI uri The URI source. | |
| uriString | back to summary |
|---|---|
| private String uriString | |
| Locator | back to summary |
|---|---|
| public Locator(URI uri) throws URISyntaxException Constructs an object representing a media source.
| |
| cacheMedia | back to summary |
|---|---|
| public void cacheMedia() Tell this Locator to preload the media into memory, if it hasn't been already. | |
| canBlock | back to summary |
|---|---|
| public boolean canBlock() | |
| closeConnection | back to summary |
|---|---|
| pack-priv static void closeConnection(URLConnection connection) | |
| createConnectionHolder | back to summary |
|---|---|
| public ConnectionHolder createConnectionHolder() throws IOException | |
| getAudioStreamConnectionHolder | back to summary |
|---|---|
| public ConnectionHolder getAudioStreamConnectionHolder(ConnectionHolder connectionHolder) throws IOException | |
| getConnection | back to summary |
|---|---|
| private Locator. | |
| getContentLength | back to summary |
|---|---|
| public long getContentLength() Retrieves the media size.
| |
| getContentLengthLong | back to summary |
|---|---|
| private static long getContentLengthLong(URLConnection connection) | |
| getContentType | back to summary |
|---|---|
| public String getContentType() Retrieves the content type describing the media content or
| |
| getContentTypeFromFileSignature | back to summary |
|---|---|
| private String getContentTypeFromFileSignature(URI uri) throws MalformedURLException, IOException | |
| getInputStream | back to summary |
|---|---|
| private InputStream getInputStream(URI uri) throws MalformedURLException, IOException | |
| getProtocol | back to summary |
|---|---|
| public String getProtocol() Retrieves the protocol of the media URL | |
| getStringLocation | back to summary |
|---|---|
| public String getStringLocation() | |
| getURI | back to summary |
|---|---|
| public URI getURI() Retrieves the associated
| |
| init | back to summary |
|---|---|
| public void init() throws URISyntaxException, IOException, FileNotFoundException | |
| setConnectionProperty | back to summary |
|---|---|
| public void setConnectionProperty(String property, Object value) Sets a property to be used by the connection to the media specified by
the URI. The meaning of the property is a function of the URI protocol
and type of media source. This method should be invoked before
calling | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Retrieves a string representation of the
| |
| waitForReadySignal | back to summary |
|---|---|
| public void waitForReadySignal() Blocks until locator is ready (connection is established or failed). | |
| Modifier and Type | Field and Description |
|---|---|
| public HttpURLConnection | |
| public int |
| Access | Constructor and Description |
|---|---|
| private |
| connection | back to summary |
|---|---|
| public HttpURLConnection connection | |
| responseCode | back to summary |
|---|---|
| public int responseCode | |
| LocatorConnection | back to summary |
|---|---|
| private LocatorConnection() | |