|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.transfer.AbstractTransfer org.xnap.transfer.AbstractUpload org.xnap.transfer.DccUpload
public class DccUpload
Uploads a file via the dcc protocol.
Nested Class Summary | |
---|---|
class |
DccUpload.StopAction
Starts the download offer. |
Field Summary | |
---|---|
static int |
SOCKET_TIMEOUT
|
Fields inherited from class org.xnap.transfer.AbstractTransfer |
---|
MIN_RECALC_INTERVAL, RECALC_INTERVAL |
Fields inherited from interface org.xnap.transfer.Transfer |
---|
TRANSFER_TIMEOUT |
Constructor Summary | |
---|---|
DccUpload(Peer peer,
java.io.File file)
|
Method Summary | |
---|---|
javax.swing.Action[] |
getActions()
Returns the actions that can performed by the transfer. |
long |
getBytesTransferred()
Returns how many bytes have been transferred since the transfer was started. |
java.io.File |
getFile()
Returns the file the transfer is using. |
java.lang.String |
getFilename()
Returns the filename that should be presented to the user. |
long |
getFilesize()
Returns the final filesize. |
int |
getLocalPort()
|
Peer |
getPeer()
Returns the peer. |
Plugin |
getPlugin()
Returns the plugin. |
java.lang.String |
getStatus()
Returns the current status that should be presented to the user. |
long |
getTotalBytesTransferred()
Returns how many bytes have been transferred. |
boolean |
isDone()
Returns true if the transfer is finished. |
boolean |
isRunning()
Returns true if the transfer is running. |
void |
start()
|
void |
stop()
|
Methods inherited from class org.xnap.transfer.AbstractTransfer |
---|
addStateListener, cleared, getAverageRate, getCurrentRate, getDescription, getElapsedTime, getIcon, getQueuePosition, getRemainingTime, getSegments, removeStateListener, stateChanged, toString, transferStarted, transferStopped |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xnap.transfer.Transfer |
---|
addStateListener, cleared, getAverageRate, getCurrentRate, getDescription, getIcon, getQueuePosition, getRemainingTime, getSegments, removeStateListener |
Field Detail |
---|
public static final int SOCKET_TIMEOUT
Constructor Detail |
---|
public DccUpload(Peer peer, java.io.File file)
peer
- the peer thae file is downloaded fromfile
- the destination file, the downloaded data is stored herehost
- the host to connect toport
- the port to connect toMethod Detail |
---|
public long getBytesTransferred()
AbstractTransfer
getBytesTransferred
in class AbstractTransfer
AbstractTransfer.getCurrentRate()
public javax.swing.Action[] getActions()
Transfer
public java.io.File getFile()
Transfer
public java.lang.String getFilename()
Transfer
getFilename
in interface Transfer
getFilename
in class AbstractTransfer
public long getFilesize()
Transfer
getFilesize
in interface Transfer
getFilesize
in class AbstractTransfer
public int getLocalPort()
public Peer getPeer()
Transfer
public Plugin getPlugin()
Transfer
public java.lang.String getStatus()
Transfer
public long getTotalBytesTransferred()
Transfer
public boolean isDone()
Transfer
public boolean isRunning()
Transfer
public void start()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |