📄 datasink.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sat May 20 18:57:43 PDT 2000 --><TITLE>: Interface DataSink</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/media/Controls.html"><B>PREV CLASS</B></A> <A HREF="../../javax/media/DataSinkProxy.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DataSink.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media</FONT><BR>Interface DataSink</H2><HR><DL><DT>public interface <B>DataSink</B><DT>extends <A HREF="../../javax/media/MediaHandler.html">MediaHandler</A>, <A HREF="../../javax/media/Controls.html">Controls</A></DL><P><code>DataSink</code> is the base interface for objects that read media content delivered by a <code>DataSource</code> and render the media to some destination. The destination is specified with a <code>MediaLocator</code>. One example of a <CODE>DataSink</CODE> is a file writer object that stores the media in a file. <p> A <CODE>DataSink</CODE> is created according to the factory mechanism used to create a <CODE>Player</CODE>.<P><DL><DT><B>Since: </B><DD>JMF 2.0</DD><DT><B>See Also: </B><DD><A HREF="../../javax/media/Manager.html#createDataSink(javax.media.protocol.DataSource, javax.media.MediaLocator)"><CODE>Manager.createDataSink(javax.media.protocol.DataSource, javax.media.MediaLocator)</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#addDataSinkListener(javax.media.datasink.DataSinkListener)">addDataSinkListener</A></B>(<A HREF="../../javax/media/datasink/DataSinkListener.html">DataSinkListener</A> listener)</CODE><BR> Adds an event listener for events generated by this <CODE>DataSink</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#close()">close</A></B>()</CODE><BR> Closes the connection to the destination described by the output <CODE>MediaLocator</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#getContentType()">getContentType</A></B>()</CODE><BR> Gets a string that describes the content type of the media that this <CODE>DataSink</CODE> is consuming.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../javax/media/MediaLocator.html">MediaLocator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#getOutputLocator()">getOutputLocator</A></B>()</CODE><BR> Gets the output <code>MediaLocator</code> that describes where the output of this <CODE>DataSink</CODE> goes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#open()">open</A></B>()</CODE><BR> Opens a connection to the destination described by the output <CODE>MediaLocator</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#removeDataSinkListener(javax.media.datasink.DataSinkListener)">removeDataSinkListener</A></B>(<A HREF="../../javax/media/datasink/DataSinkListener.html">DataSinkListener</A> listener)</CODE><BR> Removes the specified event listener from this <CODE>DataSink</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#setOutputLocator(javax.media.MediaLocator)">setOutputLocator</A></B>(<A HREF="../../javax/media/MediaLocator.html">MediaLocator</A> output)</CODE><BR> Sets the output <code>MediaLocator</code> for this <CODE>DataSink</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#start()">start</A></B>()</CODE><BR> Initiates data transfer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/media/DataSink.html#stop()">stop</A></B>()</CODE><BR> Stops the data transfer.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.media.MediaHandler"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.media.<A HREF="../../javax/media/MediaHandler.html">MediaHandler</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/media/MediaHandler.html#setSource(javax.media.protocol.DataSource)">setSource</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.media.Controls"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.media.<A HREF="../../javax/media/Controls.html">Controls</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../javax/media/Controls.html#getControl(java.lang.String)">getControl</A>, <A HREF="../../javax/media/Controls.html#getControls()">getControls</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -