|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.media.protocol.DataSource
javax.media.protocol.PullDataSource
javax.media.protocol.URLDataSource
public class URLDataSource
A default data-source created directly from
a URL using URLConnection.
URL,
URLConnection,
InputSourceStream| Field Summary | |
|---|---|
protected URLConnection |
conn
|
protected boolean |
connected
|
protected ContentDescriptor |
contentType
|
| Fields inherited from interface javax.media.Duration |
|---|
DURATION_UNBOUNDED, DURATION_UNKNOWN |
| Constructor Summary | |
|---|---|
protected |
URLDataSource()
Implemented by subclasses. |
|
URLDataSource(URL url)
Construct a URLDataSource
directly from a URL. |
| Method Summary | |
|---|---|
void |
connect()
Initialize the connection with the source. |
void |
disconnect()
Disconnect the source. |
String |
getContentType()
Return the content type name. |
Object |
getControl(String controlName)
Returns null, because this source doesn't provide any controls. |
Object[] |
getControls()
Returns an empty array, because this source doesn't provide any controls. |
Time |
getDuration()
Returns Duration.DURATION_UNKNOWN. |
PullSourceStream[] |
getStreams()
Get the collection of streams that this source manages. |
void |
start()
Initiate data-transfer. |
void |
stop()
Stops the |
| Methods inherited from class javax.media.protocol.DataSource |
|---|
getLocator, initCheck, setLocator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected URLConnection conn
protected ContentDescriptor contentType
protected boolean connected
| Constructor Detail |
|---|
protected URLDataSource()
public URLDataSource(URL url)
throws IOException
URLDataSource
directly from a URL.
IOException| Method Detail |
|---|
public PullSourceStream[] getStreams()
PullDataSourceDataSource provides the only indication of
what streams can be available on this connection.
getStreams in class PullDataSource
public void connect()
throws IOException
connect in class DataSourceIOException - Thrown if there are problems setting
up the connection.public String getContentType()
getContentType in class DataSourcepublic void disconnect()
disconnect in class DataSource
public void start()
throws IOException
DataSourcestart method must be
called before data is available.
(You must call connect before calling start.)
start in class DataSourceIOException - Thrown if there are IO problems with the source
when start is called.
public void stop()
throws IOException
stop in class DataSourceIOExceptionpublic Time getDuration()
Duration.DURATION_UNKNOWN.
The duration is not available from an InputStream.
Duration.DURATION_UNKNOWN.public Object[] getControls()
Object array.public Object getControl(String controlName)
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||