1 16 package org.apache.commons.net.ftp; 17 18 29 30 public final class FTPReply 31 { 32 33 public static final int CODE_110 = 110; 34 public static final int CODE_120 = 120; 35 public static final int CODE_125 = 125; 36 public static final int CODE_150 = 150; 37 public static final int CODE_200 = 200; 38 public static final int CODE_202 = 202; 39 public static final int CODE_211 = 211; 40 public static final int CODE_212 = 212; 41 public static final int CODE_213 = 213; 42 public static final int CODE_214 = 214; 43 public static final int CODE_215 = 215; 44 public static final int CODE_220 = 220; 45 public static final int CODE_221 = 221; 46 public static final int CODE_225 = 225; 47 public static final int CODE_226 = 226; 48 public static final int CODE_227 = 227; 49 public static final int CODE_230 = 230; 50 public static final int CODE_250 = 250; 51 public static final int CODE_257 = 257; 52 public static final int CODE_331 = 331; 53 public static final int CODE_332 = 332; 54 public static final int CODE_350 = 350; 55 public static final int CODE_421 = 421; 56 public static final int CODE_425 = 425; 57 public static final int CODE_426 = 426; 58 public static final int CODE_450 = 450; 59 public static final int CODE_451 = 451; 60 public static final int CODE_452 = 452; 61 public static final int CODE_500 = 500; 62 public static final int CODE_501 = 501; 63 public static final int CODE_502 = 502; 64 public static final int CODE_503 = 503; 65 public static final int CODE_504 = 504; 66 public static final int CODE_521 = 521; 67 public static final int CODE_530 = 530; 68 public static final int CODE_532 = 532; 69 public static final int CODE_550 = 550; 70 public static final int CODE_551 = 551; 71 public static final int CODE_552 = 552; 72 public static final int CODE_553 = 553; 73 74 public static final int RESTART_MARKER = CODE_110; 75 public static final int SERVICE_NOT_READY = CODE_120; 76 public static final int DATA_CONNECTION_ALREADY_OPEN = CODE_125; 77 public static final int FILE_STATUS_OK = CODE_150; 78 public static final int COMMAND_OK = CODE_200; 79 public static final int COMMAND_IS_SUPERFLUOUS = CODE_202; 80 public static final int SYSTEM_STATUS = CODE_211; 81 public static final int DIRECTORY_STATUS = CODE_212; 82 public static final int FILE_STATUS = CODE_213; 83 public static final int HELP_MESSAGE = CODE_214; 84 public static final int NAME_SYSTEM_TYPE = CODE_215; 85 public static final int SERVICE_READY = CODE_220; 86 public static final int SERVICE_CLOSING_CONTROL_CONNECTION = CODE_221; 87 public static final int DATA_CONNECTION_OPEN = CODE_225; 88 public static final int CLOSING_DATA_CONNECTION = CODE_226; 89 public static final int ENTERING_PASSIVE_MODE = CODE_227; 90 public static final int USER_LOGGED_IN = CODE_230; 91 public static final int FILE_ACTION_OK = CODE_250; 92 public static final int PATHNAME_CREATED = CODE_257; 93 public static final int NEED_PASSWORD = CODE_331; 94 public static final int NEED_ACCOUNT = CODE_332; 95 public static final int FILE_ACTION_PENDING = CODE_350; 96 public static final int SERVICE_NOT_AVAILABLE = CODE_421; 97 public static final int CANNOT_OPEN_DATA_CONNECTION = CODE_425; 98 public static final int TRANSFER_ABORTED = CODE_426; 99 public static final int FILE_ACTION_NOT_TAKEN = CODE_450; 100 public static final int ACTION_ABORTED = CODE_451; 101 public static final int INSUFFICIENT_STORAGE = CODE_452; 102 public static final int UNRECOGNIZED_COMMAND = CODE_500; 103 public static final int SYNTAX_ERROR_IN_ARGUMENTS = CODE_501; 104 public static final int COMMAND_NOT_IMPLEMENTED = CODE_502; 105 public static final int BAD_COMMAND_SEQUENCE = CODE_503; 106 public static final int COMMAND_NOT_IMPLEMENTED_FOR_PARAMETER = CODE_504; 107 public static final int NOT_LOGGED_IN = CODE_530; 108 public static final int NEED_ACCOUNT_FOR_STORING_FILES = CODE_532; 109 public static final int FILE_UNAVAILABLE = CODE_550; 110 public static final int PAGE_TYPE_UNKNOWN = CODE_551; 111 public static final int STORAGE_ALLOCATION_EXCEEDED = CODE_552; 112 public static final int FILE_NAME_NOT_ALLOWED = CODE_553; 113 114 private FTPReply() 116 {} 117 118 130 public static boolean isPositivePreliminary(int reply) 131 { 132 return (reply >= 100 && reply < 200); 133 } 134 135 145 public static boolean isPositiveCompletion(int reply) 146 { 147 return (reply >= 200 && reply < 300); 148 } 149 150 163 public static boolean isPositiveIntermediate(int reply) 164 { 165 return (reply >= 300 && reply < 400); 166 } 167 168 178 public static boolean isNegativeTransient(int reply) 179 { 180 return (reply >= 400 && reply < 500); 181 } 182 183 193 public static boolean isNegativePermanent(int reply) 194 { 195 return (reply >= 500 && reply < 600); 196 } 197 198 } 199 | Popular Tags |