Source Code Cross Referenced for FTPCommand.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » ftp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache commons net 1.4.1 » org.apache.commons.net.ftp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2001-2005 The Apache Software Foundation
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.apache.commons.net.ftp;
017:
018:        /***
019:         * FTPCommand stores a set of constants for FTP command codes.  To interpret
020:         * the meaning of the codes, familiarity with RFC 959 is assumed.
021:         * The mnemonic constant names are transcriptions from the code descriptions
022:         * of RFC 959.  For those who think in terms of the actual FTP commands,
023:         * a set of constants such as {@link #USER  USER } are provided
024:         * where the constant name is the same as the FTP command.
025:         * <p>
026:         * <p>
027:         * @author Daniel F. Savarese
028:         ***/
029:
030:        public final class FTPCommand {
031:
032:            public static final int USER = 0;
033:            public static final int PASS = 1;
034:            public static final int ACCT = 2;
035:            public static final int CWD = 3;
036:            public static final int CDUP = 4;
037:            public static final int SMNT = 5;
038:            public static final int REIN = 6;
039:            public static final int QUIT = 7;
040:            public static final int PORT = 8;
041:            public static final int PASV = 9;
042:            public static final int TYPE = 10;
043:            public static final int STRU = 11;
044:            public static final int MODE = 12;
045:            public static final int RETR = 13;
046:            public static final int STOR = 14;
047:            public static final int STOU = 15;
048:            public static final int APPE = 16;
049:            public static final int ALLO = 17;
050:            public static final int REST = 18;
051:            public static final int RNFR = 19;
052:            public static final int RNTO = 20;
053:            public static final int ABOR = 21;
054:            public static final int DELE = 22;
055:            public static final int RMD = 23;
056:            public static final int MKD = 24;
057:            public static final int PWD = 25;
058:            public static final int LIST = 26;
059:            public static final int NLST = 27;
060:            public static final int SITE = 28;
061:            public static final int SYST = 29;
062:            public static final int STAT = 30;
063:            public static final int HELP = 31;
064:            public static final int NOOP = 32;
065:
066:            public static final int USERNAME = USER;
067:            public static final int PASSWORD = PASS;
068:            public static final int ACCOUNT = ACCT;
069:            public static final int CHANGE_WORKING_DIRECTORY = CWD;
070:            public static final int CHANGE_TO_PARENT_DIRECTORY = CDUP;
071:            public static final int STRUCTURE_MOUNT = SMNT;
072:            public static final int REINITIALIZE = REIN;
073:            public static final int LOGOUT = QUIT;
074:            public static final int DATA_PORT = PORT;
075:            public static final int PASSIVE = PASV;
076:            public static final int REPRESENTATION_TYPE = TYPE;
077:            public static final int FILE_STRUCTURE = STRU;
078:            public static final int TRANSFER_MODE = MODE;
079:            public static final int RETRIEVE = RETR;
080:            public static final int STORE = STOR;
081:            public static final int STORE_UNIQUE = STOU;
082:            public static final int APPEND = APPE;
083:            public static final int ALLOCATE = ALLO;
084:            public static final int RESTART = REST;
085:            public static final int RENAME_FROM = RNFR;
086:            public static final int RENAME_TO = RNTO;
087:            public static final int ABORT = ABOR;
088:            public static final int DELETE = DELE;
089:            public static final int REMOVE_DIRECTORY = RMD;
090:            public static final int MAKE_DIRECTORY = MKD;
091:            public static final int PRINT_WORKING_DIRECTORY = PWD;
092:            //  public static final int LIST = LIST;
093:            public static final int NAME_LIST = NLST;
094:            public static final int SITE_PARAMETERS = SITE;
095:            public static final int SYSTEM = SYST;
096:            public static final int STATUS = STAT;
097:
098:            //public static final int HELP = HELP;
099:            //public static final int NOOP = NOOP;
100:
101:            // Cannot be instantiated
102:            private FTPCommand() {
103:            }
104:
105:            static final String[] _commands = { "USER", "PASS", "ACCT", "CWD",
106:                    "CDUP", "SMNT", "REIN", "QUIT", "PORT", "PASV", "TYPE",
107:                    "STRU", "MODE", "RETR", "STOR", "STOU", "APPE", "ALLO",
108:                    "REST", "RNFR", "RNTO", "ABOR", "DELE", "RMD", "MKD",
109:                    "PWD", "LIST", "NLST", "SITE", "SYST", "STAT", "HELP",
110:                    "NOOP" };
111:
112:            /**
113:             * Retrieve the FTP protocol command string corresponding to a specified
114:             * command code.
115:             * <p>
116:             * @param command The command code.
117:             * @return The FTP protcol command string corresponding to a specified
118:             *         command code.
119:             */
120:            public static final String getCommand(int command) {
121:                return _commands[command];
122:            }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.