public class Ports extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static int | MAX_VALUEThe maximum port value per https://tools.ietf.org/html/rfc6335. | 
| static int | MIN_VALUEThe minimum port value per https://tools.ietf.org/html/rfc6335. | 
| static int | SCHEME_DEFAULTThe scheme default port. | 
| Constructor and Description | 
|---|
| Ports() | 
| Modifier and Type | Method and Description | 
|---|---|
| static int | check(int port)Checks a port number. | 
| static int | checkWithDefault(int port)Checks a port number where  -1indicates the scheme default port. | 
public static final int SCHEME_DEFAULT
public static final int MIN_VALUE
public static final int MAX_VALUE
public static int checkWithDefault(int port)
-1 indicates the scheme default port.port - The port to check where -1 indicates the scheme default port.IllegalArgumentException - If the port parameter is outside the specified range of valid port values, which is between 0 and
             65535, inclusive. -1 indicates the scheme default port.public static int check(int port)
port - The port to check.IllegalArgumentException - If the port parameter is outside the specified range of valid port values, which is between 0 and
             65535, inclusive.Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.