org.eclipse.ocl.examples.debug.vm.utils
Class SocketUtil

java.lang.Object
  extended by org.eclipse.ocl.examples.debug.vm.utils.SocketUtil

public class SocketUtil
extends java.lang.Object


Field Summary
protected  VMDebugCore debugCore
           
 
Constructor Summary
SocketUtil(VMDebugCore debugCore)
           
 
Method Summary
 boolean close(java.io.InputStream is)
           
 boolean close(java.io.OutputStream os)
           
 boolean close(java.net.ServerSocket socket)
           
 boolean close(java.net.Socket socket)
           
static int findFreePort()
          Returns a free port number on localhost, or -1 if unable to find a free port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugCore

@NonNull
protected final VMDebugCore debugCore
Constructor Detail

SocketUtil

public SocketUtil(@NonNull
                  VMDebugCore debugCore)
Method Detail

findFreePort

public static int findFreePort()
Returns a free port number on localhost, or -1 if unable to find a free port.

Returns:
a free port number on localhost, or -1 if unable to find a free port
Since:
3.0

close

public boolean close(java.net.Socket socket)

close

public boolean close(java.net.ServerSocket socket)

close

public boolean close(java.io.InputStream is)

close

public boolean close(java.io.OutputStream os)