198199200201202203204205206207208
final DatagramSocket socket = channel.socket(); try { socket.bind(inetLocal); } catch (SocketException e) { if (socket.isBound()) { throw Util.initCause(new AlreadyBoundException(), e); } if (socket.isClosed()) { throw Util.initCause(new ClosedChannelException(), e); } throw e;
150151152153154155156157158159160
final Socket socket = channel.socket(); try { socket.bind(inetLocal); } catch (SocketException e) { if (socket.isBound()) { throw Util.initCause(new AlreadyBoundException(), e); } if (socket.isClosed()) { throw Util.initCause(new ClosedChannelException(), e); } throw e;
131132133134135136137138139140141
try { socket.bind(local, backlog); } catch (SocketException e) { if (socket.isBound()) { throw Util.initCause(new AlreadyBoundException(), e); } if (socket.isClosed()) { throw Util.initCause(new ClosedChannelException(), e); } throw e;
133134135136137138139140141142143
200201202203204205206207208209210
152153154155156157158159160161162