|
FTP Client | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.amoebacode.ftp.FTPCommandRegistry
FTPCommandRegistry includes all basic FTP commands and provides convenience methods for concatenating commands with arguments.
| Field Summary | |
static java.lang.String |
ABORT_COMMAND
"abor" - abort a file transfer |
static java.lang.String |
ACCOUNT_COMMAND
"acct" - send account information |
static java.lang.String |
APPEND_COMMAND
"appe" - append to a remote file |
static java.lang.String |
ASCII_TRANSFER_TYPE
"a" - ascii transfer type |
static java.lang.String |
BINARY_TRANSFER_TYPE
"i" - binary transfer type |
static java.lang.String |
CHANGE_DIRECTORY_COMMAND
"cwd" - change working directory |
static java.lang.String |
DELETE_FILE_COMMAND
"dele" - delete a remote file |
static java.lang.String |
FILE_SIZE_COMMAND
"size" - return the size of a file |
static java.lang.String |
HELP_COMMAND
"help" - return help on using the server |
static java.lang.String |
LIST_FILES_COMMAND
"list" - list remote files |
static java.lang.String |
MAKE_DIRECTORY_COMMAND
"mkd" - make a remote directory |
static java.lang.String |
MODE_COMMAND
"mode" - set transfer mode |
static java.lang.String |
MODIFY_DATE_COMMAND
"mdtm" - return the modification time of a file |
static java.lang.String |
NAME_LIST_COMMAND
"nlst" - name list of remote directory |
static java.lang.String |
NULL_COMMAND
"noop" - do nothing |
static java.lang.String |
PASSIVE_MODE_COMMAND
"pasv" - enter passive mode |
static java.lang.String |
PASSWORD_COMMAND
"pass" - send password |
static java.lang.String |
PORT_COMMAND
"port" - open a data port |
static java.lang.String |
PRINT_DIRECTORY_COMMAND
"pwd" - print working directory |
static java.lang.String |
QUIT_COMMAND
"quit" - terminate the connection |
static java.lang.String |
REINITIALIZE_COMMAND
"rein" - reinitialize the connection |
static java.lang.String |
REMOVE_DIRECTORY_COMMAND
"rmd" - remove a remote directory |
static java.lang.String |
RENAME_FROM_COMMAND
"rnfr - rename from |
static java.lang.String |
RENAME_TO_COMMAND
"rnto" - rename to |
static java.lang.String |
RETRIEVE_COMMAND
"retr" - retrieve a remote file |
static java.lang.String |
SITE_COMMAND
"site" - site-specific commands |
private static java.lang.String |
SPACE
a single space |
static java.lang.String |
STATUS_COMMAND
"stat" - return server status |
static java.lang.String |
STORE_COMMAND
"stor" - store a file on the remote host |
static java.lang.String |
STORE_UNIQUE_COMMAND
"stou" - store a file uniquely |
static java.lang.String |
STRUCTURE_COMMAND
"stru" - set file transfer structure |
static java.lang.String |
SYSTEM_TYPE_COMMAND
"syst" - return system type |
static java.lang.String |
TRANSFER_TYPE_COMMAND
"type" - set transfer type |
static java.lang.String |
UP_DIRECTORY_COMMAND
"cdup" - cwd to the parent of the current directory |
static java.lang.String |
USERNAME_COMMAND
"user" - send username |
| Constructor Summary | |
FTPCommandRegistry()
|
|
| Method Summary | |
protected static java.lang.String |
getChangeDirectoryCommand(java.lang.String directory)
Returns a change directory command for the specified directory. |
private static java.lang.String |
getCommandWithArgument(java.lang.String command,
java.lang.String argument)
Composes a complete command from the specified command and argument. |
protected static java.lang.String |
getDeleteFileCommand(java.lang.String fileName)
Returns a delete file command for the specified filename. |
protected static java.lang.String |
getFileSizeCommand(java.lang.String fileName)
Returns a file size command for the specified filename. |
protected static java.lang.String |
getMakeDirectoryCommand(java.lang.String directory)
Returns a make directory command for the specified directory. |
protected static java.lang.String |
getModifyDateCommand(java.lang.String fileName)
Returns a modify date command for the specified filename. |
protected static java.lang.String |
getPasswordCommand(java.lang.String password)
Returns a password command for the specified password. |
protected static java.lang.String |
getRemoveDirectoryCommand(java.lang.String directory)
Returns a remove directory command for the specified directory. |
protected static java.lang.String |
getRenameFromCommand(java.lang.String oldName)
Returns a rename from command for the specified filename. |
protected static java.lang.String |
getRenameToCommand(java.lang.String newName)
Returns a rename to command for the specified filename. |
protected static java.lang.String |
getRetrieveCommand(java.lang.String serverPath)
Returns a retrieve command for the specified filename. |
protected static java.lang.String |
getSiteCommand(java.lang.String siteArg)
Returns a SITE command for the specified filename. added by Pinellas County Government jdr 9/27/2004 |
protected static java.lang.String |
getStoreCommand(java.lang.String serverPath)
Returns a store command for the specified filename. |
private static java.lang.String |
getTransferType(boolean ascii)
Converts the specified boolean to a String transfer type. |
protected static java.lang.String |
getTransferTypeCommand(boolean ascii)
Returns a transfer type command for the specified transfer type. |
protected static java.lang.String |
getUsernameCommand(java.lang.String username)
Returns a username command for the specified username. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String ABORT_COMMAND
public static final java.lang.String CHANGE_DIRECTORY_COMMAND
public static final java.lang.String DELETE_FILE_COMMAND
public static final java.lang.String LIST_FILES_COMMAND
public static final java.lang.String MODIFY_DATE_COMMAND
public static final java.lang.String MAKE_DIRECTORY_COMMAND
public static final java.lang.String NAME_LIST_COMMAND
public static final java.lang.String PASSWORD_COMMAND
public static final java.lang.String PASSIVE_MODE_COMMAND
public static final java.lang.String PORT_COMMAND
public static final java.lang.String PRINT_DIRECTORY_COMMAND
public static final java.lang.String QUIT_COMMAND
public static final java.lang.String RETRIEVE_COMMAND
public static final java.lang.String REMOVE_DIRECTORY_COMMAND
public static final java.lang.String RENAME_FROM_COMMAND
public static final java.lang.String RENAME_TO_COMMAND
public static final java.lang.String SITE_COMMAND
public static final java.lang.String FILE_SIZE_COMMAND
public static final java.lang.String STORE_COMMAND
public static final java.lang.String TRANSFER_TYPE_COMMAND
public static final java.lang.String USERNAME_COMMAND
public static final java.lang.String ACCOUNT_COMMAND
public static final java.lang.String APPEND_COMMAND
public static final java.lang.String UP_DIRECTORY_COMMAND
public static final java.lang.String HELP_COMMAND
public static final java.lang.String MODE_COMMAND
public static final java.lang.String NULL_COMMAND
public static final java.lang.String REINITIALIZE_COMMAND
public static final java.lang.String STATUS_COMMAND
public static final java.lang.String STORE_UNIQUE_COMMAND
public static final java.lang.String STRUCTURE_COMMAND
public static final java.lang.String SYSTEM_TYPE_COMMAND
public static final java.lang.String ASCII_TRANSFER_TYPE
public static final java.lang.String BINARY_TRANSFER_TYPE
private static final java.lang.String SPACE
| Constructor Detail |
public FTPCommandRegistry()
| Method Detail |
protected static java.lang.String getUsernameCommand(java.lang.String username)
username - the username to send
protected static java.lang.String getPasswordCommand(java.lang.String password)
password - the password to send
protected static java.lang.String getChangeDirectoryCommand(java.lang.String directory)
directory - the directory to change to
protected static java.lang.String getRenameFromCommand(java.lang.String oldName)
oldName - the name of the file to rename
protected static java.lang.String getSiteCommand(java.lang.String siteArg)
siteArg - the argument for the SITE command
protected static java.lang.String getRenameToCommand(java.lang.String newName)
newName - the new name of the file
protected static java.lang.String getMakeDirectoryCommand(java.lang.String directory)
directory - the directory to create
protected static java.lang.String getRemoveDirectoryCommand(java.lang.String directory)
directory - the directory to delete
protected static java.lang.String getDeleteFileCommand(java.lang.String fileName)
fileName - the file to delete
protected static java.lang.String getModifyDateCommand(java.lang.String fileName)
fileName - the file to query
protected static java.lang.String getFileSizeCommand(java.lang.String fileName)
fileName - the file to query
protected static java.lang.String getRetrieveCommand(java.lang.String serverPath)
serverPath - the file to retrieve
protected static java.lang.String getStoreCommand(java.lang.String serverPath)
serverPath - the file to store
protected static java.lang.String getTransferTypeCommand(boolean ascii)
ascii - indicates whether ASCII transfer type should be used
private static java.lang.String getCommandWithArgument(java.lang.String command,
java.lang.String argument)
command - the command to executeargument - the argument to pass in
private static java.lang.String getTransferType(boolean ascii)
ascii - indicates whether ASCII transfer type should be used
|
FTP Client | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||