public class FTPControlSocket
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CONTROL_PORT
The default and standard control port number for FTP
|
static java.lang.String |
cvsId
Revision control id
|
static int |
MAX_ACTIVE_RETRY
Maximum number of auto retries in active mode
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the socket
|
void |
logout()
Quit this FTP session and clean up.
|
FTPReply |
sendCommand(java.lang.String command)
Send a command to the FTP server and
return the server's reply as a structured
reply object
|
void |
setActivePortRange(int lowest,
int highest)
Set the port number range for active mode
|
FTPReply |
validateReply(FTPReply reply,
java.lang.String expectedReplyCode)
Validate the response the host has supplied against the
expected reply.
|
FTPReply |
validateReply(FTPReply reply,
java.lang.String[] expectedReplyCodes)
Validate the response the host has supplied against the
expected reply.
|
FTPReply |
validateReply(java.lang.String reply,
java.lang.String[] expectedReplyCodes)
Validate the response the host has supplied against the
expected reply.
|
public static final java.lang.String cvsId
public static int MAX_ACTIVE_RETRY
public static final int CONTROL_PORT
public void close()
throws java.io.IOException
java.io.IOExceptionpublic void logout()
throws java.io.IOException
java.io.IOExceptionpublic void setActivePortRange(int lowest,
int highest)
lowest - lowest port number in rangehighest - highest port number in rangepublic FTPReply sendCommand(java.lang.String command) throws java.io.IOException
command - command to sendjava.io.IOExceptionpublic FTPReply validateReply(java.lang.String reply, java.lang.String[] expectedReplyCodes) throws java.io.IOException, FTPException
reply - the entire reply string we receivedexpectedReplyCodes - array of expected repliesjava.io.IOExceptionFTPExceptionpublic FTPReply validateReply(FTPReply reply, java.lang.String[] expectedReplyCodes) throws FTPException
reply - reply objectexpectedReplyCodes - array of expected repliesFTPExceptionpublic FTPReply validateReply(FTPReply reply, java.lang.String expectedReplyCode) throws FTPException
reply - reply objectexpectedReplyCode - expected replyFTPException