public class PortRange
extends java.lang.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).
|
public PortRange(int low,
int high)
java.lang.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(java.lang.String s) throws java.lang.IllegalArgumentException
s.java.lang.IllegalArgumentExceptionpublic int getLower()
public int getUpper()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013 Oracle Corporation. All Rights Reserved.