DccFileTransfer.html 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.4.2) on Mon Dec 14 20:07:23 GMT 2009 -->
  6. <TITLE>
  7. DccFileTransfer (PircBot 1.5.0 - Java IRC API Bot Framework)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.jibble.pircbot.DccFileTransfer class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../pircbot-style.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. parent.document.title="DccFileTransfer (PircBot 1.5.0 - Java IRC API Bot Framework)";
  15. }
  16. </SCRIPT>
  17. </HEAD>
  18. <BODY BGCOLOR="white" onload="windowTitle();">
  19. <!-- ========= START OF TOP NAVBAR ======= -->
  20. <A NAME="navbar_top"><!-- --></A>
  21. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  22. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  23. <TR>
  24. <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  25. <A NAME="navbar_top_firstrow"><!-- --></A>
  26. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  27. <TR ALIGN="center" VALIGN="top">
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DccFileTransfer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  32. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  35. </TR>
  36. </TABLE>
  37. </TD>
  38. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  39. <b>PircBot Java IRC Bot</b></EM>
  40. </TD>
  41. </TR>
  42. <TR>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. &nbsp;<A HREF="../../../org/jibble/pircbot/DccChat.html" title="class in org.jibble.pircbot"><B>PREV CLASS</B></A>&nbsp;
  45. &nbsp;<A HREF="../../../org/jibble/pircbot/DccManager.html" title="class in org.jibble.pircbot"><B>NEXT CLASS</B></A></FONT></TD>
  46. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  47. <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
  48. &nbsp;<A HREF="DccFileTransfer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  49. &nbsp;<SCRIPT type="text/javascript">
  50. <!--
  51. if(window==top) {
  52. document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  53. }
  54. //-->
  55. </SCRIPT>
  56. <NOSCRIPT>
  57. <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  58. </NOSCRIPT>
  59. </FONT></TD>
  60. </TR>
  61. <TR>
  62. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  63. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  64. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  65. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  66. </TR>
  67. </TABLE>
  68. <A NAME="skip-navbar_top"></A>
  69. <!-- ========= END OF TOP NAVBAR ========= -->
  70. <HR>
  71. <!-- ======== START OF CLASS DATA ======== -->
  72. <H2>
  73. <FONT SIZE="-1">
  74. org.jibble.pircbot</FONT>
  75. <BR>
  76. Class DccFileTransfer</H2>
  77. <PRE>
  78. <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
  79. <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>org.jibble.pircbot.DccFileTransfer</B>
  80. </PRE>
  81. <HR>
  82. <DL>
  83. <DT>public class <B>DccFileTransfer</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
  84. <P>
  85. This class is used to administer a DCC file transfer.
  86. <P>
  87. <P>
  88. <DL>
  89. <DT><B>Since:</B></DT>
  90. <DD>1.2.0</DD>
  91. <DT><B>Version:</B></DT>
  92. <DD>1.5.0 (Build time: Mon Dec 14 20:07:17 2009)</DD>
  93. <DT><B>Author:</B></DT>
  94. <DD>Paul James Mutton,
  95. <a href="http://www.jibble.org/">http://www.jibble.org/</a></DD>
  96. </DL>
  97. <HR>
  98. <P>
  99. <!-- ======== NESTED CLASS SUMMARY ======== -->
  100. <!-- =========== FIELD SUMMARY =========== -->
  101. <A NAME="field_summary"><!-- --></A>
  102. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  103. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  104. <TD COLSPAN=2><FONT SIZE="+2">
  105. <B>Field Summary</B></FONT></TD>
  106. </TR>
  107. <TR BGCOLOR="white" CLASS="TableRowColor">
  108. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  109. <CODE>static&nbsp;int</CODE></FONT></TD>
  110. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#BUFFER_SIZE">BUFFER_SIZE</A></B></CODE>
  111. <BR>
  112. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default buffer size to use when sending and receiving files.</TD>
  113. </TR>
  114. </TABLE>
  115. &nbsp;
  116. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  117. <!-- ========== METHOD SUMMARY =========== -->
  118. <A NAME="method_summary"><!-- --></A>
  119. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  120. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  121. <TD COLSPAN=2><FONT SIZE="+2">
  122. <B>Method Summary</B></FONT></TD>
  123. </TR>
  124. <TR BGCOLOR="white" CLASS="TableRowColor">
  125. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  126. <CODE>&nbsp;void</CODE></FONT></TD>
  127. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#close()">close</A></B>()</CODE>
  128. <BR>
  129. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops the DCC file transfer by closing the connection.</TD>
  130. </TR>
  131. <TR BGCOLOR="white" CLASS="TableRowColor">
  132. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  133. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD>
  134. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getFile()">getFile</A></B>()</CODE>
  135. <BR>
  136. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the suggested file to be used for this transfer.</TD>
  137. </TR>
  138. <TR BGCOLOR="white" CLASS="TableRowColor">
  139. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  140. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  141. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getHostname()">getHostname</A></B>()</CODE>
  142. <BR>
  143. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the hostname of the file sender.</TD>
  144. </TR>
  145. <TR BGCOLOR="white" CLASS="TableRowColor">
  146. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  147. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  148. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getLogin()">getLogin</A></B>()</CODE>
  149. <BR>
  150. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the login of the file sender.</TD>
  151. </TR>
  152. <TR BGCOLOR="white" CLASS="TableRowColor">
  153. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  154. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  155. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getNick()">getNick</A></B>()</CODE>
  156. <BR>
  157. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the nick of the other user taking part in this file transfer.</TD>
  158. </TR>
  159. <TR BGCOLOR="white" CLASS="TableRowColor">
  160. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  161. <CODE>&nbsp;long</CODE></FONT></TD>
  162. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getNumericalAddress()">getNumericalAddress</A></B>()</CODE>
  163. <BR>
  164. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the address of the sender as a long.</TD>
  165. </TR>
  166. <TR BGCOLOR="white" CLASS="TableRowColor">
  167. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  168. <CODE>&nbsp;long</CODE></FONT></TD>
  169. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getPacketDelay()">getPacketDelay</A></B>()</CODE>
  170. <BR>
  171. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns the delay time between each packet that is send or received.</TD>
  172. </TR>
  173. <TR BGCOLOR="white" CLASS="TableRowColor">
  174. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  175. <CODE>&nbsp;int</CODE></FONT></TD>
  176. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getPort()">getPort</A></B>()</CODE>
  177. <BR>
  178. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the port number to be used when making the connection.</TD>
  179. </TR>
  180. <TR BGCOLOR="white" CLASS="TableRowColor">
  181. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  182. <CODE>&nbsp;long</CODE></FONT></TD>
  183. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getProgress()">getProgress</A></B>()</CODE>
  184. <BR>
  185. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the progress (in bytes) of the current file transfer.</TD>
  186. </TR>
  187. <TR BGCOLOR="white" CLASS="TableRowColor">
  188. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  189. <CODE>&nbsp;double</CODE></FONT></TD>
  190. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getProgressPercentage()">getProgressPercentage</A></B>()</CODE>
  191. <BR>
  192. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the progress of the file transfer as a percentage.</TD>
  193. </TR>
  194. <TR BGCOLOR="white" CLASS="TableRowColor">
  195. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  196. <CODE>&nbsp;long</CODE></FONT></TD>
  197. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getSize()">getSize</A></B>()</CODE>
  198. <BR>
  199. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the size (in bytes) of the file being transfered.</TD>
  200. </TR>
  201. <TR BGCOLOR="white" CLASS="TableRowColor">
  202. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  203. <CODE>&nbsp;long</CODE></FONT></TD>
  204. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#getTransferRate()">getTransferRate</A></B>()</CODE>
  205. <BR>
  206. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the rate of data transfer in bytes per second.</TD>
  207. </TR>
  208. <TR BGCOLOR="white" CLASS="TableRowColor">
  209. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  210. <CODE>&nbsp;boolean</CODE></FONT></TD>
  211. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#isIncoming()">isIncoming</A></B>()</CODE>
  212. <BR>
  213. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the file transfer is incoming (somebody is sending
  214. the file to us).</TD>
  215. </TR>
  216. <TR BGCOLOR="white" CLASS="TableRowColor">
  217. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  218. <CODE>&nbsp;boolean</CODE></FONT></TD>
  219. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#isOutgoing()">isOutgoing</A></B>()</CODE>
  220. <BR>
  221. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the file transfer is outgoing (we are sending the
  222. file to someone).</TD>
  223. </TR>
  224. <TR BGCOLOR="white" CLASS="TableRowColor">
  225. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  226. <CODE>&nbsp;void</CODE></FONT></TD>
  227. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#receive(java.io.File, boolean)">receive</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;file,
  228. boolean&nbsp;resume)</CODE>
  229. <BR>
  230. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Receives a DccFileTransfer and writes it to the specified file.</TD>
  231. </TR>
  232. <TR BGCOLOR="white" CLASS="TableRowColor">
  233. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  234. <CODE>&nbsp;void</CODE></FONT></TD>
  235. <TD><CODE><B><A HREF="../../../org/jibble/pircbot/DccFileTransfer.html#setPacketDelay(long)">setPacketDelay</A></B>(long&nbsp;millis)</CODE>
  236. <BR>
  237. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the delay time between sending or receiving each packet.</TD>
  238. </TR>
  239. </TABLE>
  240. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  241. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  242. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  243. <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
  244. </TR>
  245. <TR BGCOLOR="white" CLASS="TableRowColor">
  246. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/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.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/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.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  247. </TR>
  248. </TABLE>
  249. &nbsp;
  250. <P>
  251. <!-- ============ FIELD DETAIL =========== -->
  252. <A NAME="field_detail"><!-- --></A>
  253. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  254. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  255. <TD COLSPAN=1><FONT SIZE="+2">
  256. <B>Field Detail</B></FONT></TD>
  257. </TR>
  258. </TABLE>
  259. <A NAME="BUFFER_SIZE"><!-- --></A><H3>
  260. BUFFER_SIZE</H3>
  261. <PRE>
  262. public static final int <B>BUFFER_SIZE</B></PRE>
  263. <DL>
  264. <DD>The default buffer size to use when sending and receiving files.
  265. <P>
  266. <DL>
  267. <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jibble.pircbot.DccFileTransfer.BUFFER_SIZE">Constant Field Values</A></DL>
  268. </DL>
  269. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  270. <!-- ============ METHOD DETAIL ========== -->
  271. <A NAME="method_detail"><!-- --></A>
  272. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  273. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  274. <TD COLSPAN=1><FONT SIZE="+2">
  275. <B>Method Detail</B></FONT></TD>
  276. </TR>
  277. </TABLE>
  278. <A NAME="receive(java.io.File, boolean)"><!-- --></A><H3>
  279. receive</H3>
  280. <PRE>
  281. public void <B>receive</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;file,
  282. boolean&nbsp;resume)</PRE>
  283. <DL>
  284. <DD>Receives a DccFileTransfer and writes it to the specified file.
  285. Resuming allows a partial download to be continue from the end of
  286. the current file contents.
  287. <P>
  288. <DD><DL>
  289. <DT><B>Parameters:</B><DD><CODE>file</CODE> - The file to write to.<DD><CODE>resume</CODE> - True if you wish to try and resume the download instead
  290. of overwriting an existing file.</DL>
  291. </DD>
  292. </DL>
  293. <HR>
  294. <A NAME="getNick()"><!-- --></A><H3>
  295. getNick</H3>
  296. <PRE>
  297. public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNick</B>()</PRE>
  298. <DL>
  299. <DD>Returns the nick of the other user taking part in this file transfer.
  300. <P>
  301. <DD><DL>
  302. <DT><B>Returns:</B><DD>the nick of the other user.</DL>
  303. </DD>
  304. </DL>
  305. <HR>
  306. <A NAME="getLogin()"><!-- --></A><H3>
  307. getLogin</H3>
  308. <PRE>
  309. public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getLogin</B>()</PRE>
  310. <DL>
  311. <DD>Returns the login of the file sender.
  312. <P>
  313. <DD><DL>
  314. <DT><B>Returns:</B><DD>the login of the file sender. null if we are sending.</DL>
  315. </DD>
  316. </DL>
  317. <HR>
  318. <A NAME="getHostname()"><!-- --></A><H3>
  319. getHostname</H3>
  320. <PRE>
  321. public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getHostname</B>()</PRE>
  322. <DL>
  323. <DD>Returns the hostname of the file sender.
  324. <P>
  325. <DD><DL>
  326. <DT><B>Returns:</B><DD>the hostname of the file sender. null if we are sending.</DL>
  327. </DD>
  328. </DL>
  329. <HR>
  330. <A NAME="getFile()"><!-- --></A><H3>
  331. getFile</H3>
  332. <PRE>
  333. public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A> <B>getFile</B>()</PRE>
  334. <DL>
  335. <DD>Returns the suggested file to be used for this transfer.
  336. <P>
  337. <DD><DL>
  338. <DT><B>Returns:</B><DD>the suggested file to be used.</DL>
  339. </DD>
  340. </DL>
  341. <HR>
  342. <A NAME="getPort()"><!-- --></A><H3>
  343. getPort</H3>
  344. <PRE>
  345. public int <B>getPort</B>()</PRE>
  346. <DL>
  347. <DD>Returns the port number to be used when making the connection.
  348. <P>
  349. <DD><DL>
  350. <DT><B>Returns:</B><DD>the port number.</DL>
  351. </DD>
  352. </DL>
  353. <HR>
  354. <A NAME="isIncoming()"><!-- --></A><H3>
  355. isIncoming</H3>
  356. <PRE>
  357. public boolean <B>isIncoming</B>()</PRE>
  358. <DL>
  359. <DD>Returns true if the file transfer is incoming (somebody is sending
  360. the file to us).
  361. <P>
  362. <DD><DL>
  363. <DT><B>Returns:</B><DD>true if the file transfer is incoming.</DL>
  364. </DD>
  365. </DL>
  366. <HR>
  367. <A NAME="isOutgoing()"><!-- --></A><H3>
  368. isOutgoing</H3>
  369. <PRE>
  370. public boolean <B>isOutgoing</B>()</PRE>
  371. <DL>
  372. <DD>Returns true if the file transfer is outgoing (we are sending the
  373. file to someone).
  374. <P>
  375. <DD><DL>
  376. <DT><B>Returns:</B><DD>true if the file transfer is outgoing.</DL>
  377. </DD>
  378. </DL>
  379. <HR>
  380. <A NAME="setPacketDelay(long)"><!-- --></A><H3>
  381. setPacketDelay</H3>
  382. <PRE>
  383. public void <B>setPacketDelay</B>(long&nbsp;millis)</PRE>
  384. <DL>
  385. <DD>Sets the delay time between sending or receiving each packet.
  386. Default is 0.
  387. This is useful for throttling the speed of file transfers to maintain
  388. a good quality of service for other things on the machine or network.
  389. <P>
  390. <DD><DL>
  391. <DT><B>Parameters:</B><DD><CODE>millis</CODE> - The number of milliseconds to wait between packets.</DL>
  392. </DD>
  393. </DL>
  394. <HR>
  395. <A NAME="getPacketDelay()"><!-- --></A><H3>
  396. getPacketDelay</H3>
  397. <PRE>
  398. public long <B>getPacketDelay</B>()</PRE>
  399. <DL>
  400. <DD>returns the delay time between each packet that is send or received.
  401. <P>
  402. <DD><DL>
  403. <DT><B>Returns:</B><DD>the delay between each packet.</DL>
  404. </DD>
  405. </DL>
  406. <HR>
  407. <A NAME="getSize()"><!-- --></A><H3>
  408. getSize</H3>
  409. <PRE>
  410. public long <B>getSize</B>()</PRE>
  411. <DL>
  412. <DD>Returns the size (in bytes) of the file being transfered.
  413. <P>
  414. <DD><DL>
  415. <DT><B>Returns:</B><DD>the size of the file. Returns -1 if the sender did not
  416. specify this value.</DL>
  417. </DD>
  418. </DL>
  419. <HR>
  420. <A NAME="getProgress()"><!-- --></A><H3>
  421. getProgress</H3>
  422. <PRE>
  423. public long <B>getProgress</B>()</PRE>
  424. <DL>
  425. <DD>Returns the progress (in bytes) of the current file transfer.
  426. When resuming, this represents the total number of bytes in the
  427. file, which may be greater than the amount of bytes resumed in
  428. just this transfer.
  429. <P>
  430. <DD><DL>
  431. <DT><B>Returns:</B><DD>the progress of the transfer.</DL>
  432. </DD>
  433. </DL>
  434. <HR>
  435. <A NAME="getProgressPercentage()"><!-- --></A><H3>
  436. getProgressPercentage</H3>
  437. <PRE>
  438. public double <B>getProgressPercentage</B>()</PRE>
  439. <DL>
  440. <DD>Returns the progress of the file transfer as a percentage.
  441. Note that this should never be negative, but could become
  442. greater than 100% if you attempt to resume a larger file
  443. onto a partially downloaded file that was smaller.
  444. <P>
  445. <DD><DL>
  446. <DT><B>Returns:</B><DD>the progress of the transfer as a percentage.</DL>
  447. </DD>
  448. </DL>
  449. <HR>
  450. <A NAME="close()"><!-- --></A><H3>
  451. close</H3>
  452. <PRE>
  453. public void <B>close</B>()</PRE>
  454. <DL>
  455. <DD>Stops the DCC file transfer by closing the connection.
  456. <P>
  457. <DD><DL>
  458. </DL>
  459. </DD>
  460. </DL>
  461. <HR>
  462. <A NAME="getTransferRate()"><!-- --></A><H3>
  463. getTransferRate</H3>
  464. <PRE>
  465. public long <B>getTransferRate</B>()</PRE>
  466. <DL>
  467. <DD>Returns the rate of data transfer in bytes per second.
  468. This value is an estimate based on the number of bytes
  469. transfered since the connection was established.
  470. <P>
  471. <DD><DL>
  472. <DT><B>Returns:</B><DD>data transfer rate in bytes per second.</DL>
  473. </DD>
  474. </DL>
  475. <HR>
  476. <A NAME="getNumericalAddress()"><!-- --></A><H3>
  477. getNumericalAddress</H3>
  478. <PRE>
  479. public long <B>getNumericalAddress</B>()</PRE>
  480. <DL>
  481. <DD>Returns the address of the sender as a long.
  482. <P>
  483. <DD><DL>
  484. <DT><B>Returns:</B><DD>the address of the sender as a long.</DL>
  485. </DD>
  486. </DL>
  487. <!-- ========= END OF CLASS DATA ========= -->
  488. <HR>
  489. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  490. <A NAME="navbar_bottom"><!-- --></A>
  491. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  492. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  493. <TR>
  494. <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  495. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  496. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  497. <TR ALIGN="center" VALIGN="top">
  498. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  499. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  500. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DccFileTransfer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  501. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  502. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  503. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  504. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  505. </TR>
  506. </TABLE>
  507. </TD>
  508. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  509. <b>PircBot Java IRC Bot</b></EM>
  510. </TD>
  511. </TR>
  512. <TR>
  513. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  514. &nbsp;<A HREF="../../../org/jibble/pircbot/DccChat.html" title="class in org.jibble.pircbot"><B>PREV CLASS</B></A>&nbsp;
  515. &nbsp;<A HREF="../../../org/jibble/pircbot/DccManager.html" title="class in org.jibble.pircbot"><B>NEXT CLASS</B></A></FONT></TD>
  516. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  517. <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
  518. &nbsp;<A HREF="DccFileTransfer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  519. &nbsp;<SCRIPT type="text/javascript">
  520. <!--
  521. if(window==top) {
  522. document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  523. }
  524. //-->
  525. </SCRIPT>
  526. <NOSCRIPT>
  527. <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  528. </NOSCRIPT>
  529. </FONT></TD>
  530. </TR>
  531. <TR>
  532. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  533. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  534. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  535. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  536. </TR>
  537. </TABLE>
  538. <A NAME="skip-navbar_bottom"></A>
  539. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  540. <HR>
  541. </BODY>
  542. </HTML>