com.mindbright.net.ftp
public class FTPServer extends java.lang.Object implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static int |
CMD_ABOR |
static int |
CMD_ACCT |
static int |
CMD_ALLO |
static int |
CMD_APPE |
static int |
CMD_CDUP |
static int |
CMD_CWD |
static int |
CMD_DELE |
static int |
CMD_FEAT |
static int |
CMD_HELP |
static int |
CMD_LIST |
static int |
CMD_MDTM |
static int |
CMD_MKD |
static int |
CMD_MODE |
static int |
CMD_NLST |
static int |
CMD_NOOP |
static int |
CMD_PASS |
static int |
CMD_PASV |
static int |
CMD_PORT |
static int |
CMD_PWD |
static int |
CMD_QUIT |
static int |
CMD_REIN |
static int |
CMD_REST |
static int |
CMD_RETR |
static int |
CMD_RMD |
static int |
CMD_RNFR |
static int |
CMD_RNTO |
static int |
CMD_SITE |
static int |
CMD_SIZE |
static int |
CMD_SMNT |
static int |
CMD_STAT |
static int |
CMD_STOR |
static int |
CMD_STOU |
static int |
CMD_STRU |
static int |
CMD_SYST |
static int |
CMD_TYPE |
static int |
CMD_UNKN |
static int |
CMD_USER |
static java.util.Hashtable<java.lang.String,java.lang.Integer> |
commands |
protected boolean |
dataConnected |
protected java.io.InputStream |
dataIn |
protected java.io.OutputStream |
dataOut |
protected java.net.ServerSocket |
dataPasvAccept |
protected int[] |
dataPortAddr |
protected java.net.Socket |
dataSocket |
protected java.net.InetAddress |
localHost |
Constructor and Description |
---|
FTPServer(java.lang.String identity,
FTPServerEventHandler eventHandler,
java.net.InetAddress localHost,
java.io.InputStream cmdInput,
java.io.OutputStream cmdOutput,
boolean needPassword) |
FTPServer(java.lang.String identity,
FTPServerEventHandler eventHandler,
java.io.InputStream cmdInput,
java.io.OutputStream cmdOutput,
boolean needPassword) |
Modifier and Type | Method and Description |
---|---|
protected void |
dataComplete() |
protected void |
dataConnect() |
protected java.lang.String |
dataPassive() |
protected int[] |
dataPort(java.lang.String arg) |
protected void |
dataReset() |
protected void |
dataStart(java.lang.String obj) |
protected java.io.InputStream |
getDataInput() |
protected java.io.OutputStream |
getDataOutput() |
void |
readLogin() |
void |
reply(int code,
java.lang.String text) |
void |
run() |
void |
terminate() |
protected java.net.InetAddress localHost
protected java.net.Socket dataSocket
protected java.net.ServerSocket dataPasvAccept
protected int[] dataPortAddr
protected boolean dataConnected
protected java.io.InputStream dataIn
protected java.io.OutputStream dataOut
public static final int CMD_UNKN
public static final int CMD_USER
public static final int CMD_PASS
public static final int CMD_ACCT
public static final int CMD_CWD
public static final int CMD_CDUP
public static final int CMD_SMNT
public static final int CMD_QUIT
public static final int CMD_REIN
public static final int CMD_PORT
public static final int CMD_PASV
public static final int CMD_TYPE
public static final int CMD_STRU
public static final int CMD_MODE
public static final int CMD_RETR
public static final int CMD_STOR
public static final int CMD_STOU
public static final int CMD_APPE
public static final int CMD_ALLO
public static final int CMD_REST
public static final int CMD_RNFR
public static final int CMD_RNTO
public static final int CMD_ABOR
public static final int CMD_DELE
public static final int CMD_RMD
public static final int CMD_MKD
public static final int CMD_PWD
public static final int CMD_LIST
public static final int CMD_NLST
public static final int CMD_SITE
public static final int CMD_SYST
public static final int CMD_STAT
public static final int CMD_HELP
public static final int CMD_NOOP
public static final int CMD_FEAT
public static final int CMD_MDTM
public static final int CMD_SIZE
public static java.util.Hashtable<java.lang.String,java.lang.Integer> commands
public FTPServer(java.lang.String identity, FTPServerEventHandler eventHandler, java.io.InputStream cmdInput, java.io.OutputStream cmdOutput, boolean needPassword)
public FTPServer(java.lang.String identity, FTPServerEventHandler eventHandler, java.net.InetAddress localHost, java.io.InputStream cmdInput, java.io.OutputStream cmdOutput, boolean needPassword)
public void run()
run
in interface java.lang.Runnable
public void terminate()
public void reply(int code, java.lang.String text) throws java.io.IOException
java.io.IOException
public void readLogin() throws java.io.IOException
java.io.IOException
protected int[] dataPort(java.lang.String arg) throws FTPException
FTPException
protected java.lang.String dataPassive() throws FTPException
FTPException
protected java.io.OutputStream getDataOutput() throws FTPException
FTPException
protected java.io.InputStream getDataInput() throws FTPException
FTPException
protected void dataConnect() throws FTPException
FTPException
protected void dataStart(java.lang.String obj) throws java.io.IOException
java.io.IOException
protected void dataComplete() throws java.io.IOException
java.io.IOException
protected void dataReset()