All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.protocol.URLDataSource
java.lang.Object
|
+----javax.media.protocol.DataSource
|
+----javax.media.protocol.PullDataSource
|
+----javax.media.protocol.URLDataSource
- public class URLDataSource
- extends PullDataSource
A default data-source created directly from
a URL
using URLConnection
.
- Version:
- 1.19, 97/08/28.
- See Also:
- URL, URLConnection, InputSourceStream
-
conn
-
-
connected
-
-
contentType
-
-
sources
-
-
URLDataSource()
- Implemented by subclasses.
-
URLDataSource(URL)
- Construct a
URLDataSource
directly from a URL
.
-
connect()
- Initialize the connection with the source.
-
disconnect()
- Disconnect the source.
-
getContentType()
- Return the content type name.
-
getControl(String)
- Returns null, because this source doesn't provide
any controls.
-
getControls()
- Returns an empty array, because this source
doesn't provide any controls.
-
getDuration()
- Returns
Duration.DURATION_UNKNOWN
.
-
getStreams()
- Get the collection of streams that this source
manages.
-
start()
- Initiate data-transfer.
-
stop()
- Stops the
conn
protected URLConnection conn
contentType
protected ContentDescriptor contentType
sources
protected URLSourceStream sources[]
connected
protected boolean connected
URLDataSource
protected URLDataSource()
- Implemented by subclasses.
URLDataSource
public URLDataSource(URL url) throws IOException
- Construct a
URLDataSource
directly from a URL
.
getStreams
public PullSourceStream[] getStreams()
- Get the collection of streams that this source
manages.
- Overrides:
- getStreams in class PullDataSource
connect
public void connect() throws IOException
- Initialize the connection with the source.
- Throws: IOException
- Thrown if there are problems setting
up the connection.
- Overrides:
- connect in class DataSource
getContentType
public String getContentType()
- Return the content type name.
- Returns:
- The content type name.
- Overrides:
- getContentType in class DataSource
disconnect
public void disconnect()
- Disconnect the source.
- Overrides:
- disconnect in class DataSource
start
public void start() throws IOException
- Initiate data-transfer.
- Overrides:
- start in class DataSource
stop
public void stop() throws IOException
- Stops the
- Overrides:
- stop in class DataSource
getDuration
public Time getDuration()
- Returns
Duration.DURATION_UNKNOWN
.
The duration is not available from an InputStream
.
- Returns:
-
Duration.DURATION_UNKNOWN
.
- Overrides:
- getDuration in class DataSource
getControls
public Object[] getControls()
- Returns an empty array, because this source
doesn't provide any controls.
- Returns:
- empty
Object
array.
- Overrides:
- getControls in class DataSource
getControl
public Object getControl(String controlName)
- Returns null, because this source doesn't provide
any controls.
- Overrides:
- getControl in class DataSource
All Packages Class Hierarchy This Package Previous Next Index