|
PircBot Java IRC Bot | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jibble.pircbot.DccFileTransfer
This class is used to administer a DCC file transfer.
Field Summary | |
static int |
BUFFER_SIZE
The default buffer size to use when sending and receiving files. |
Method Summary | |
void |
close()
Stops the DCC file transfer by closing the connection. |
File |
getFile()
Returns the suggested file to be used for this transfer. |
String |
getHostname()
Returns the hostname of the file sender. |
String |
getLogin()
Returns the login of the file sender. |
String |
getNick()
Returns the nick of the other user taking part in this file transfer. |
long |
getNumericalAddress()
Returns the address of the sender as a long. |
long |
getPacketDelay()
returns the delay time between each packet that is send or received. |
int |
getPort()
Returns the port number to be used when making the connection. |
long |
getProgress()
Returns the progress (in bytes) of the current file transfer. |
double |
getProgressPercentage()
Returns the progress of the file transfer as a percentage. |
long |
getSize()
Returns the size (in bytes) of the file being transfered. |
long |
getTransferRate()
Returns the rate of data transfer in bytes per second. |
boolean |
isIncoming()
Returns true if the file transfer is incoming (somebody is sending the file to us). |
boolean |
isOutgoing()
Returns true if the file transfer is outgoing (we are sending the file to someone). |
void |
receive(File file,
boolean resume)
Receives a DccFileTransfer and writes it to the specified file. |
void |
setPacketDelay(long millis)
Sets the delay time between sending or receiving each packet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BUFFER_SIZE
Method Detail |
public void receive(File file, boolean resume)
file
- The file to write to.resume
- True if you wish to try and resume the download instead
of overwriting an existing file.public String getNick()
public String getLogin()
public String getHostname()
public File getFile()
public int getPort()
public boolean isIncoming()
public boolean isOutgoing()
public void setPacketDelay(long millis)
millis
- The number of milliseconds to wait between packets.public long getPacketDelay()
public long getSize()
public long getProgress()
public double getProgressPercentage()
public void close()
public long getTransferRate()
public long getNumericalAddress()
|
PircBot Java IRC Bot | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |