TUM CCSM Commons

edu.tum.cs.commons.net
Class SocketUtils

java.lang.Object
  extended by edu.tum.cs.commons.net.SocketUtils

public class SocketUtils
extends java.lang.Object

Utility methods used in conjunction with sockets.

Version:
$Rev: 28668 $
Author:
hummelb, $Author: heineman $
Rating:
GREEN Hash: 66E2820DADBD6636110BD951A76A091E

Constructor Summary
SocketUtils()
           
 
Method Summary
static int getFreePort()
          Returns a new free TCP port number
static boolean isFreePort(int portNumber)
          Checks whether the given TCP port is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketUtils

public SocketUtils()
Method Detail

isFreePort

public static boolean isFreePort(int portNumber)
Checks whether the given TCP port is available.


getFreePort

public static int getFreePort()
                       throws java.io.IOException
Returns a new free TCP port number

Throws:
java.io.IOException

TUM CCSM Commons

TUM CCSM Commons - 2.7