📄 outgoingfiletransfer.html
字号:
<CODE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#getOutputStream()">getOutputStream</A></B>()</CODE><BR> Returns the output stream connected to the peer to transfer the file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#getResponseTimeout()">getResponseTimeout</A></B>()</CODE><BR> Returns the time in milliseconds after which the file transfer negotiation process will timeout if the other user has not responded.</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="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#sendFile(java.io.File, java.lang.String)">sendFile</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> description)</CODE><BR> This method handles the stream negotiation process and transmits the file to the remote user.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#sendFile(java.lang.String, long, java.lang.String)">sendFile</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fileName, long fileSize, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> description)</CODE><BR> This method handles the negotiation of the file transfer and the stream, it only returns the created stream after the negotiation has been completed.</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="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#sendFile(java.lang.String, long, java.lang.String, org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.NegotiationProgress)">sendFile</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fileName, long fileSize, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> description, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.NegotiationProgress.html" title="interface in org.jivesoftware.smackx.filetransfer">OutgoingFileTransfer.NegotiationProgress</A> progress)</CODE><BR> This methods handles the transfer and stream negotiation process.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#setException(java.lang.Exception)">setException</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A> exception)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#setOutputStream(java.io.OutputStream)">setOutputStream</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> stream)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#setResponseTimeout(int)">setResponseTimeout</A></B>(int responseTimeout)</CODE><BR> Sets the time in milliseconds after which the file transfer negotiation process will timeout if the other user has not responded.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#setStatus(org.jivesoftware.smackx.filetransfer.FileTransfer.Status)">setStatus</A></B>(<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.Status.html" title="enum in org.jivesoftware.smackx.filetransfer">FileTransfer.Status</A> status)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.html#updateStatus(org.jivesoftware.smackx.filetransfer.FileTransfer.Status, org.jivesoftware.smackx.filetransfer.FileTransfer.Status)">updateStatus</A></B>(<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.Status.html" title="enum in org.jivesoftware.smackx.filetransfer">FileTransfer.Status</A> oldStatus, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.Status.html" title="enum in org.jivesoftware.smackx.filetransfer">FileTransfer.Status</A> newStatus)</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.jivesoftware.smackx.filetransfer.FileTransfer"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.jivesoftware.smackx.filetransfer.<A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html" title="class in org.jivesoftware.smackx.filetransfer">FileTransfer</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getAmountWritten()">getAmountWritten</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getError()">getError</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getException()">getException</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getFileName()">getFileName</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getFilePath()">getFilePath</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getFileSize()">getFileSize</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getPeer()">getPeer</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getProgress()">getProgress</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#getStatus()">getStatus</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#isDone()">isDone</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#setError(org.jivesoftware.smackx.filetransfer.FileTransfer.Error)">setError</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#setFileInfo(java.lang.String, long)">setFileInfo</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#setFileInfo(java.lang.String, java.lang.String, long)">setFileInfo</A>, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransfer.html#writeToStream(java.io.InputStream, java.io.OutputStream)">writeToStream</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="OutgoingFileTransfer(java.lang.String, java.lang.String, java.lang.String, org.jivesoftware.smackx.filetransfer.FileTransferNegotiator)"><!-- --></A><H3>OutgoingFileTransfer</H3><PRE>protected <B>OutgoingFileTransfer</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> initiator, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> target, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> streamID, <A HREF="../../../../org/jivesoftware/smackx/filetransfer/FileTransferNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer">FileTransferNegotiator</A> transferNegotiator)</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getResponseTimeout()"><!-- --></A><H3>getResponseTimeout</H3><PRE>public static int <B>getResponseTimeout</B>()</PRE><DL><DD>Returns the time in milliseconds after which the file transfer negotiation process will timeout if the other user has not responded.<P><DD><DL><DT><B>Returns:</B><DD>Returns the time in milliseconds after which the file transfer negotiation process will timeout if the remote user has not responded.</DL></DD></DL><HR><A NAME="setResponseTimeout(int)"><!-- --></A><H3>setResponseTimeout</H3><PRE>public static void <B>setResponseTimeout</B>(int responseTimeout)</PRE><DL><DD>Sets the time in milliseconds after which the file transfer negotiation process will timeout if the other user has not responded.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>responseTimeout</CODE> - The timeout time in milliseconds.</DL></DD></DL><HR><A NAME="setOutputStream(java.io.OutputStream)"><!-- --></A><H3>setOutputStream</H3><PRE>protected void <B>setOutputStream</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> stream)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="getOutputStream()"><!-- --></A><H3>getOutputStream</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> <B>getOutputStream</B>()</PRE><DL><DD>Returns the output stream connected to the peer to transfer the file. It is only available after it has been succesfully negotiated by the <A HREF="../../../../org/jivesoftware/smackx/filetransfer/StreamNegotiator.html" title="class in org.jivesoftware.smackx.filetransfer"><CODE>StreamNegotiator</CODE></A>.<P><DD><DL><DT><B>Returns:</B><DD>Returns the output stream connected to the peer to transfer the file.</DL></DD></DL><HR><A NAME="sendFile(java.lang.String, long, java.lang.String)"><!-- --></A><H3>sendFile</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> <B>sendFile</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> fileName, long fileSize, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> description) throws <A HREF="../../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -