* @throws IOException If a port cannot be obtained
* @throws IllegalArgumentException is either bound is not between
* 0 and 65535, or if <code>end</code> is < than <code>low</code>.
*/
public static int getPortFromRange(final int start, final int end) throws IOException {
PortRangeServerSocketFactory factory = new PortRangeServerSocketFactory(start, end);
ServerSocket ss = factory.createServerSocket(0);
int p = factory.getLastPort();
ss.close();
return(p);
}