@PublicApi public final class PortUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PORT |
static int |
MIN_PORT |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isValidPort(int port)
Tells the caller of the passed int represents a valid TCP/UDP port.
|
static boolean |
isValidPort(String port)
Tells the caller of the passed string represents a valid TCP/UDP port.
|
static int |
parsePort(String port)
Return the TCP/UDP port contained in the passed port string.
|
public static final int MIN_PORT
public static final int MAX_PORT
public static int parsePort(String port)
port - the string to get the port from.public static boolean isValidPort(String port)
port - the string to check.public static boolean isValidPort(int port)
port - the int to check.Copyright © 2002-2021 Atlassian. All Rights Reserved.