If the address is null
, then the system will pick up an ephemeral port and a valid local address to bind the socket.
@param addr The address & port to bind to.
@throws SocketException if any error happens during the bind, or if thesocket is already bound.
@throws SecurityException if a security manager exists and its checkListen
method doesn't allow the operation.
@throws IllegalArgumentException if addr is a SocketAddress subclassnot supported by this socket.
@since 1.4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|