f00f.net.irc.martyr.dcc
Class DccSendHandler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--f00f.net.irc.martyr.dcc.DccSendHandler
All Implemented Interfaces:
java.lang.Runnable

public class DccSendHandler
extends java.lang.Thread

See Also:
AutoDccSetup, DccTestBot, getStreamForReceive(java.lang.String, int)

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DccSendHandler(java.net.Socket socket, java.lang.String filename, int filesize)
           
 
Method Summary
protected  java.io.OutputStream getStreamForReceive(java.lang.String filename, int filesize)
          This method should return an output stream that a file can be placed into.
protected  void handleDccSend(java.net.Socket socket, java.lang.String filename, int filesize)
          A call to this method means that a connection has been established and processing the file should commence.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DccSendHandler

public DccSendHandler(java.net.Socket socket,
                      java.lang.String filename,
                      int filesize)
Method Detail

handleDccSend

protected void handleDccSend(java.net.Socket socket,
                             java.lang.String filename,
                             int filesize)
                      throws java.io.IOException
A call to this method means that a connection has been established and processing the file should commence.

getStreamForReceive

protected java.io.OutputStream getStreamForReceive(java.lang.String filename,
                                                   int filesize)
                                            throws java.io.IOException
This method should return an output stream that a file can be placed into. Default implementation throws a FileNotFoundException. This is the only method you must override to provide fully functional DCC file transfers.

run

public void run()
Overrides:
run in class java.lang.Thread


Copyright ? 2000,2001, f00f networks. All Rights Reserved.