Logo Search packages:      
Sourcecode: jftp version File versions  Download package

FtpConstants.java

/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
package net.sf.jftp.net;


/**
* This class provides some constant used by FtpConnection.
*/
00022 public interface FtpConstants
{
    /** List */

    //public static final String LIST = "LIST -laL";

    /** Possible upload() / download() return code */
00029     public static final int TRANSFER_FAILED = -1;

    /** Possible upload() / download() return code */
00032     public static final int TRANSFER_STOPPED = -2;

    /** Possible upload() / download() / remove() return code */
00035     public static final int MKDIR_FAILED = -3;

    /** Possible upload() / download() return code */
00038     public static final int PERMISSION_DENIED = -4;

    /** Possible upload() / download() / exists() return code */
00041     public static final int CHDIR_FAILED = -5;

    /** Possible login() return code */
00044     public final static int WRONG_LOGIN_DATA = -6;

    /** Possible login() return code */
00047     public final static int OFFLINE = -7;

    /** Possible login() / remove() return code */
00050     public final static int GENERIC_FAILED = -8;

    /** Possible remove() return code */
00053     public final static int REMOVE_FAILED = -9;

    /** Possible upload() return code */
00056     public final static int RENAME_FAILED = -10;

    /** Possible exists() return code */
00059     public final static int FILE_NOT_FOUND = -11;

    /** Possible up/download() return code */
00062     public final static int DATACONNECTION_FAILED = -12;

    /** Possible upload() / download() return code */
00065     public static final int NEW_TRANSFER_SPAWNED = 0;

    /** Possible upload() / download() return code */
00068     public static final int TRANSFER_SUCCESSFUL = 1;

    /** Possible login() return code */
00071     public final static int LOGIN_OK = 2;

    /** Possible remove() return code */
00074     public final static int REMOVE_SUCCESSFUL = 3;

    /** Possible getPermissions() / exists() return code */
00077     public static final int R = 23;

    /** Possible getPermissions() / exists() return code */
00080     public static final int W = 42;

    /** Possible getPermissions() / exists() return code */
00083     public static final int DENIED = -666;

    // Access Control Commands

    /** User Name */
00088     public final static String USER = "USER";

    /** Password */
00091     public final static String PASS = "PASS";

    /** Account */
00094     public final static String ACCT = "ACCT";

    /** Change Working Directory */
00097     public final static String CWD = "CWD";

    /** Change to Parent Directory */
00100     public final static String CDUP = "CDUP";

    /** Structure Mount */
00103     public final static String SMNT = "SMNT";

    /** Reinitialize */
00106     public final static String REIN = "REIN";

    /** Logout */
00109     public final static String QUIT = "QUIT";

    // Transfer Parameter Commands

    /** Data Port */
00114     public final static String PORT = "PORT";

    /** Passive */
00117     public final static String PASV = "PASV";

    /** Representation Type (ASCII, EBCDIC, Image, Non-print, Telnet format effectors, Carriage Control, Local byte Byte size) */
00120     public final static String TYPE = "TYPE";

    /** File Structure (File, Record Structure, Page Structure) */
00123     public final static String STRU = "STRU";

    /** Transfer Mode (Stream, Block, Compressed) */
00126     public final static String MODE = "MODE";

    // FTP Service Commands

    /** Retrieve */
00131     public final static String RETR = "RETR";

    /** Store */
00134     public final static String STOR = "STOR";

    /** Store Unique */
00137     public final static String STOU = "STOU";

    /** Append (with create) */
00140     public final static String APPE = "APPE";

    /** Allocate */
00143     public final static String ALLO = "ALLO";

    /** Restart */
00146     public final static String REST = "REST";

    /** Rename From */
00149     public final static String RNFR = "RNFR";

    /** Rename To */
00152     public final static String RNTO = "RNTO";

    /** Abort */
00155     public final static String ABOR = "ABOR";

    /** Delete */
00158     public final static String DELE = "DELE";

    /** Remove Directory */
00161     public final static String RMD = "RMD";

    /** Make Directory */
00164     public final static String MKD = "MKD";

    /** Print Working Directory */
00167     public final static String PWD = "PWD";

    /** Name List */
00170     public final static String NLST = "NLST";

    /** Site Parameters */
00173     public final static String SITE = "SITE";

    /** System */
00176     public final static String SYST = "SYST";

    /** Status */
00179     public final static String STAT = "STAT";

    /** Help */
00182     public final static String HELP = "HELP";

    /** NOOP */
00185     public final static String NOOP = "NOOP";

    // The following commands were introduced in rfc 2228 FTP Security Extensions

    /** Authentication/Security Mechanism */
00190     public final static String AUTH = "AUTH";

    /** Authentication/Security Data */
00193     public final static String ADAT = "ADAT";

    /** Data Channel Protection Level */
00196     public final static String PROT = "PROT";

    /** Protection Buffer Size */
00199     public final static String PBSZ = "PBSZ";

    /** Clear Command Channel */
00202     public final static String CCC = "CCC";

    /** Integrity Protected Command */
00205     public final static String MIC = "MIC";

    /** Confidentiality Protected Command */
00208     public final static String CONF = "CONF";

    /** Privacy Protected Command */
00211     public final static String ENC = "ENC";

    // end of commands from rfc 2228
    // ftp reply codes
    // x0z Syntax
    // x1z Information
    // x2z Connections
    // x3z Authentication and accounting
    // x4z Unspecified
    // x5z File system
    // 1yz Positive Preliminary reply

    /** Restart marker reply */
00224     public final static String RC110 = "110";

    /** Service ready in nnn minutes */
00227     public final static String RC120 = "120";

    /** Data connection already open */
00230     public final static String RC125 = "125";

    /** File status okay; about to open data connection */
00233     public final static String RC150 = "150";

    // 2yz Positive Completion reply

    /** Command okay */
00238     public final static String FTP200_OK = "2";

    /** Command not implemented, superfluous at this site */
00241     public final static String RC202 = "202";

    /** System status, or system help reply */
00244     public final static String RC211 = "211";

    /** Directory status */
00247     public final static String RC212 = "212";

    /** File status */
00250     public final static String RC213 = "213";

    /** Help message */
00253     public final static String RC214 = "214";

    /** System type */
00256     public final static String FTP215_SYSTEM_TYPE = "215";

    /** Service ready for new user */
00259     public final static String FTP220_SERVICE_READY = "220";

    /** Service closing control connection */
00262     public final static String FTP221_SERVICE_CLOSING = "221";

    /** Data connection open; no transfer in progress */
00265     public final static String RC225 = "225";

    /** Closing data connection; requested file action successful */
00268     public final static String FTP226_CLOSING_DATA_REQUEST_SUCCESSFUL = "226";

    /** Entering Passive Mode */
00271     public final static String FTP227_ENTERING_PASSIVE_MODE = "227";

    /** User logged in, proceed */
00274     public final static String FTP230_LOGGED_IN = "2"; // 230

    /** Requested file action okay, completed */
00277     public final static String FTP250_COMPLETED = "250";

    /** "PATHNAME" created */
00280     public final static String FTP257_PATH_CREATED = "257";

    // 3yz Positive Intermediate reply

    /** User name okay, need password */
00285     public final static String FTP331_USER_OK_NEED_PASSWORD = "331";

    /** Need account for login */
00288     public final static String RC332 = "332";

    /** Requested file action pending further information */
00291     public final static String RC350 = "350";

    // 4yz Transient Negative Completion reply

    /** Service not available */
00296     public final static String RC421 = "421";

    /** Can't open data connection */
00299     public final static String RC425 = "425";

    /** Connection closed; transfer aborted */
00302     public final static String RC426 = "426";

    /** Requested file action not taken, file unavailable (file busy) */
00305     public final static String RC450 = "450";

    /** Requested action aborted: local error in processing */
00308     public final static String RC451 = "451";

    /** Requested action not taken, insufficient storage space in system */
00311     public final static String RC452 = "452";

    // 5yz Permanent Negative Completion reply

    /** Syntax error, command unrecognized */
00316     public final static String RC500 = "500";

    /** Syntax error in parameters or arguments */
00319     public final static String RC501 = "501";

    /** Command not implemented */
00322     public final static String RC502 = "502";

    /** Bad sequence of commands */
00325     public final static String RC503 = "503";

    /** Command not implemented for that parameter */
00328     public final static String RC504 = "504";

    /** Not logged in */
00331     public final static String RC530 = "530";

    /** Need account for storing files */
00334     public final static String RC532 = "532";

    /** Requested action not taken, file unavailable (file not found, no access) */
00337     public final static String RC550 = "550";

    /** Requested action aborted: page type unknown */
00340     public final static String RC551 = "551";

    /** Requested file action aborted, exceeded storage allocation */
00343     public final static String RC552 = "552";

    /** Requested action not taken, file name not allowed */
00346     public final static String RC553 = "553";
}

Generated by  Doxygen 1.6.0   Back to index