1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.net.ftp;
19
20
21
22
23
24
25
26
27
28
29 public final class FTPReply
30 {
31
32 public static final int RESTART_MARKER = 110;
33 public static final int SERVICE_NOT_READY = 120;
34 public static final int DATA_CONNECTION_ALREADY_OPEN = 125;
35 public static final int FILE_STATUS_OK = 150;
36 public static final int COMMAND_OK = 200;
37 public static final int COMMAND_IS_SUPERFLUOUS = 202;
38 public static final int SYSTEM_STATUS = 211;
39 public static final int DIRECTORY_STATUS = 212;
40 public static final int FILE_STATUS = 213;
41 public static final int HELP_MESSAGE = 214;
42 public static final int NAME_SYSTEM_TYPE = 215;
43 public static final int SERVICE_READY = 220;
44 public static final int SERVICE_CLOSING_CONTROL_CONNECTION = 221;
45 public static final int DATA_CONNECTION_OPEN = 225;
46 public static final int CLOSING_DATA_CONNECTION = 226;
47 public static final int ENTERING_PASSIVE_MODE = 227;
48
49 public static final int ENTERING_EPSV_MODE = 229;
50 public static final int USER_LOGGED_IN = 230;
51 public static final int FILE_ACTION_OK = 250;
52 public static final int PATHNAME_CREATED = 257;
53 public static final int NEED_PASSWORD = 331;
54 public static final int NEED_ACCOUNT = 332;
55 public static final int FILE_ACTION_PENDING = 350;
56 public static final int SERVICE_NOT_AVAILABLE = 421;
57 public static final int CANNOT_OPEN_DATA_CONNECTION = 425;
58 public static final int TRANSFER_ABORTED = 426;
59 public static final int FILE_ACTION_NOT_TAKEN = 450;
60 public static final int ACTION_ABORTED = 451;
61 public static final int INSUFFICIENT_STORAGE = 452;
62 public static final int UNRECOGNIZED_COMMAND = 500;
63 public static final int SYNTAX_ERROR_IN_ARGUMENTS = 501;
64 public static final int COMMAND_NOT_IMPLEMENTED = 502;
65 public static final int BAD_COMMAND_SEQUENCE = 503;
66 public static final int COMMAND_NOT_IMPLEMENTED_FOR_PARAMETER = 504;
67 public static final int NOT_LOGGED_IN = 530;
68 public static final int NEED_ACCOUNT_FOR_STORING_FILES = 532;
69 public static final int FILE_UNAVAILABLE = 550;
70 public static final int PAGE_TYPE_UNKNOWN = 551;
71 public static final int STORAGE_ALLOCATION_EXCEEDED = 552;
72 public static final int FILE_NAME_NOT_ALLOWED = 553;
73
74
75
76
77 public static final int SECURITY_DATA_EXCHANGE_COMPLETE = 234;
78
79 public static final int SECURITY_DATA_EXCHANGE_SUCCESSFULLY = 235;
80
81 public static final int SECURITY_MECHANISM_IS_OK = 334;
82
83 public static final int SECURITY_DATA_IS_ACCEPTABLE = 335;
84
85 public static final int UNAVAILABLE_RESOURCE = 431;
86
87 public static final int BAD_TLS_NEGOTIATION_OR_DATA_ENCRYPTION_REQUIRED = 522;
88
89 public static final int DENIED_FOR_POLICY_REASONS = 533;
90
91 public static final int REQUEST_DENIED = 534;
92
93 public static final int FAILED_SECURITY_CHECK = 535;
94
95 public static final int REQUESTED_PROT_LEVEL_NOT_SUPPORTED = 536;
96
97
98
99
100 public static final int EXTENDED_PORT_FAILURE = 522;
101
102
103 private FTPReply()
104 {}
105
106
107
108
109
110
111
112
113
114
115
116
117
118 public static boolean isPositivePreliminary(int reply)
119 {
120 return (reply >= 100 && reply < 200);
121 }
122
123
124
125
126
127
128
129
130
131
132
133 public static boolean isPositiveCompletion(int reply)
134 {
135 return (reply >= 200 && reply < 300);
136 }
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151 public static boolean isPositiveIntermediate(int reply)
152 {
153 return (reply >= 300 && reply < 400);
154 }
155
156
157
158
159
160
161
162
163
164
165
166 public static boolean isNegativeTransient(int reply)
167 {
168 return (reply >= 400 && reply < 500);
169 }
170
171
172
173
174
175
176
177
178
179
180
181 public static boolean isNegativePermanent(int reply)
182 {
183 return (reply >= 500 && reply < 600);
184 }
185
186
187
188
189
190
191
192
193 public static boolean isProtectedReplyCode(int reply)
194 {
195
196
197 return (reply >= 600 && reply < 700);
198 }
199
200
201 }