|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.media.protocol.DataSource | +--javax.media.protocol.PullDataSource | +--javax.media.protocol.URLDataSource
A default data-source created directly from
a URL
using URLConnection
.
Field Summary | |
protected java.net.URLConnection |
conn
|
protected boolean |
connected
|
protected ContentDescriptor |
contentType
|
protected javax.media.protocol.URLDataSource.URLSourceStream[] |
sources
|
Constructor Summary | |
protected |
URLDataSource()
Implemented by subclasses. |
|
URLDataSource(java.net.URL url)
Construct a URLDataSource
directly from a URL . |
Method Summary | |
void |
connect()
Initialize the connection with the source. |
void |
disconnect()
Disconnect the source. |
java.lang.String |
getContentType()
Return the content type name. |
java.lang.Object |
getControl(java.lang.String controlName)
Returns null, because this source doesn't provide any controls. |
java.lang.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 java.net.URLConnection conn
protected ContentDescriptor contentType
protected javax.media.protocol.URLDataSource.URLSourceStream[] sources
protected boolean connected
Constructor Detail |
protected URLDataSource()
public URLDataSource(java.net.URL url) throws java.io.IOException
URLDataSource
directly from a URL
.Method Detail |
public PullSourceStream[] getStreams()
DataSource
provides the only indication of
what streams can be available on this connection.public void connect() throws java.io.IOException
public java.lang.String getContentType()
public void disconnect()
public void start() throws java.io.IOException
start
method must be
called before data is available.
(You must call connect
before calling start
.)start
is called.public void stop() throws java.io.IOException
public Time getDuration()
Duration.DURATION_UNKNOWN
.
The duration is not available from an InputStream
.Duration.DURATION_UNKNOWN
.public java.lang.Object[] getControls()
Object
array.public java.lang.Object getControl(java.lang.String controlName)
null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |