public class Ports extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAX_VALUE
The maximum port value per https://tools.ietf.org/html/rfc6335.
|
static int |
MIN_VALUE
The minimum port value per https://tools.ietf.org/html/rfc6335.
|
static int |
SCHEME_DEFAULT
The scheme default port.
|
| 构造器和说明 |
|---|
Ports() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
check(int port)
Checks a port number.
|
static int |
checkWithDefault(int port)
Checks a port number where
-1 indicates 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 © 2023. All rights reserved.