|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
public interface DataSink
DataSink
is the base interface for objects that
read media content delivered by a DataSource
and render the media to some destination. The destination is
specified with a MediaLocator
. One example of a DataSink
is a file
writer object that stores the media in a file.
A DataSink
is created according to the factory mechanism used to create a Player
.
Manager.createDataSink(javax.media.protocol.DataSource, javax.media.MediaLocator)
方法摘要 | |
---|---|
void |
addDataSinkListener(javax.media.datasink.DataSinkListener listener)
Adds an event listener for events generated by this DataSink . |
void |
close()
Closes the connection to the destination described by the output MediaLocator . |
java.lang.String |
getContentType()
Gets a string that describes the content type of the media that this DataSink is consuming. |
MediaLocator |
getOutputLocator()
Gets the output MediaLocator that describes where
the output of this DataSink goes. |
void |
open()
Opens a connection to the destination described by the output MediaLocator . |
void |
removeDataSinkListener(javax.media.datasink.DataSinkListener listener)
Removes the specified event listener from this DataSink . |
void |
setOutputLocator(MediaLocator output)
Sets the output MediaLocator for this DataSink . |
void |
start()
Initiates data transfer. |
void |
stop()
Stops the data transfer. |
从接口 javax.media.MediaHandler 继承的方法 |
---|
setSource |
从接口 javax.media.Controls 继承的方法 |
---|
getControl, getControls |
方法详细信息 |
---|
void setOutputLocator(MediaLocator output)
MediaLocator
for this DataSink
.
This method should only be called once; an error is thrown if
the locator has already been set.
output
- A MediaLocator
that describes where
the output of this DataSink
goes.MediaLocator getOutputLocator()
MediaLocator
that describes where
the output of this DataSink
goes.
MediaLocator
for this
DataSink
.void start() throws java.io.IOException
open
before calling the start
method.
java.io.IOException
- If there are IO problems with the source
when start
is called.void stop() throws java.io.IOException
stop
does nothing.
java.io.IOException
- If there are IO problems with the source
when stop
is called.void open() throws java.io.IOException, java.lang.SecurityException
MediaLocator
. This method
establishes a channel between this DataSink
and its destination.
java.io.IOException
- If there are IO problems
when open
is called.
java.lang.SecurityException
- If there are any security
violations while attempting to access the destination described
by the output MediaLocator
.void close()
MediaLocator
.
This method frees the resources used to maintain a
connection to the destination.
If no resources are in use, close
is ignored.
If stop
hasn't already been called,
calling close
stops the data transfer.
A DataSink
can no longer be used once it has been closed.
java.lang.String getContentType()
DataSink
is consuming.
void addDataSinkListener(javax.media.datasink.DataSinkListener listener)
DataSink
.
listener
- The DataSinkListener
to add.void removeDataSinkListener(javax.media.datasink.DataSinkListener listener)
DataSink
.
listener
- The DataSinkListener
to remove.
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |