channel.socket().setReuseAddress(b);
} catch (SocketException e) {
throw new NioException(e);
}
}
<BUG>public InetSocketAddress getLocalAddress() {
InetAddress addr = channel.socket().getInetAddress();</BUG>
int port = channel.socket().getLocalPort();
return new InetSocketAddress(addr, port);
}

channel.socket().setReuseAddress(b);
} catch (SocketException e) {
throw new NioException(e);
}
}
public InetSocketAddress getLocalAddress() {
if(!channel.socket().isBound())
throw new IllegalStateException("Socket not bound yet.  please bind before calling getLocalAddress");
InetAddress addr = channel.socket().getInetAddress();
int port = channel.socket().getLocalPort();
return new InetSocketAddress(addr, port);
}
