public class PortRange extends Object
| Constructor and Description |
|---|
PortRange(int port)
Creates a port range containing a single port.
|
PortRange(int low,
int high)
Creates a port range with the given bounds (both inclusive).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getLower() |
int |
getUpper() |
String |
toString() |
static PortRange |
valueOf(String s)
Parse a port range.
|
public PortRange(int low,
int high)
IllegalArgumentException - is either bound is not between
1 and 65535, or if high is lower than
low.public PortRange(int port)
public static PortRange valueOf(String s) throws IllegalArgumentException
s.IllegalArgumentExceptionpublic int getLower()
public int getUpper()
Copyright © 2017–2019 Oracle Corporation. All rights reserved.