Lines Matching refs:parameters
70 * Parse a 32-bit IP address and 16-bit port number from the String[] of FTP command parameters.
73 * @param parameters - the String[] of command parameters. It is the concatenation
77 * representation). Thus, the six parameters for the port command would be:
81 * @return the HostAndPort object with the host InetAddres and int port parsed from the parameters
83 * - if parameters is null or contains an insufficient number of elements
84 * @throws NumberFormatException - if one of the parameters does not contain a parsable integer
86 public static HostAndPort parseHostAndPort(String[] parameters) {
87 verifySufficientParameters(parameters);
89 byte host1 = parseByte(parameters[0]);
90 byte host2 = parseByte(parameters[1]);
91 byte host3 = parseByte(parameters[2]);
92 byte host4 = parseByte(parameters[3]);
103 int port1 = Integer.parseInt(parameters[4]);
104 int port2 = Integer.parseInt(parameters[5]);
135 * Verify that the parameters is not null and contains the required number of elements
137 * @param parameters - the String[] of command parameters
138 * @throws CommandSyntaxException - if parameters is null or contains an insufficient number of elements
140 private static void verifySufficientParameters(String[] parameters) {
141 if (parameters == null || parameters.length < 6) {
142 List parms = parameters == null ? null : Arrays.asList(parameters);
143 throw new CommandSyntaxException("The PORT command must contain least be 6 parameters: " + parms);