|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrero.dcc.ProtocolDCC
rero.dcc.Receive
Field Summary | |
protected File |
dumpTo
|
protected FileOutputStream |
fileStream
|
protected long |
finalSize
|
protected static int |
PACKET_SIZE
|
protected long |
receivedSize
|
protected long |
startSize
|
Fields inherited from class rero.dcc.ProtocolDCC |
DCC_CHAT, DCC_RECEIVE, DCC_SEND, DCC_TIMEOUT, dispatcher, eventData, idleTime, nickname, socket, startTime, state, STATE_CLOSED, STATE_OPEN, STATE_WAIT |
Constructor Summary | |
Receive(String _nickname,
File _dumpTo,
long _finalSize)
Create a ready to rock and roll receive socket. |
Method Summary | |
void |
fireError(String description)
|
void |
fireEvent(String event,
String description)
|
long |
getBytesReceived()
return the number of bytes that have been received thus far |
long |
getExpectedSize()
return the expected size of the file we are receiving |
File |
getFile()
return the object pointing to the File we are downloading |
long |
getStartOffset()
return the number of bytes that we started out with (0 normally, however in the case of a resume this number could be anything from 0 up to nearly the size of the file |
long |
getTimeRemaining()
return the estimated time remaning in seconds |
int |
getTransferRate()
return the number of bytes transferred per second |
int |
getTypeOfDCC()
return the type of DCC based on a constant |
void |
pleaseResume()
|
void |
run()
|
void |
setFile(File f)
|
Methods inherited from class rero.dcc.ProtocolDCC |
announceFramework, close, getIdleTime, getLocalPort, getNickname, getPort, getRemoteAddress, getStartTime, getState, getTotalTime, isConnected, setDCCSocket |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static int PACKET_SIZE
protected File dumpTo
protected FileOutputStream fileStream
protected long receivedSize
protected long finalSize
protected long startSize
Constructor Detail |
public Receive(String _nickname, File _dumpTo, long _finalSize)
Method Detail |
public long getBytesReceived()
public long getExpectedSize()
public File getFile()
public long getTimeRemaining()
public void setFile(File f)
public void pleaseResume()
public long getStartOffset()
public int getTransferRate()
public int getTypeOfDCC()
ProtocolDCC
getTypeOfDCC
in class ProtocolDCC
public void run()
run
in class ProtocolDCC
public void fireEvent(String event, String description)
public void fireError(String description)
fireError
in class ProtocolDCC
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |