|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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)| Method Summary | |
void |
addDataSinkListener(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(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. |
| Methods inherited from interface javax.media.MediaHandler |
setSource |
| Methods inherited from interface javax.media.Controls |
getControl,
getControls |
| Method Detail |
public 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.public MediaLocator getOutputLocator()
MediaLocator that describes where
the output of this DataSink goes.MediaLocator for this
DataSink.
public void start()
throws java.io.IOException
open before calling the start method.start is called.
public void stop()
throws java.io.IOException
stop does nothing.stop is called.
public void open()
throws java.io.IOException,
java.lang.SecurityException
MediaLocator. This method
establishes a channel between this DataSink and its destination.open is called.MediaLocator.public 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.public java.lang.String getContentType()
DataSink is consuming.public void addDataSinkListener(DataSinkListener listener)
DataSink.listener - The DataSinkListener to add.public void removeDataSinkListener(DataSinkListener listener)
DataSink.listener - The DataSinkListener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||