code: public InetAddress getInetAddress() {
          if (!isBound())
              return null;
          try {
              InetAddress in = getImpl().getInetAddress();
              if (!NetUtil.doRevealLocalAddress()) {
                  SecurityManager sm = System.getSecurityManager();
                  if (sm != null)
                      sm.checkConnect(in.getHostAddress(), -1);
              }
              return in;
          } catch (SecurityException e) {
              return InetAddress.getLoopbackAddress();
          } catch (SocketException e) {
              // nothing
              // If we're bound, the impl has been created
              // so we shouldn't get here
          }
          return null;
      }
docs: Returns the local address of this server socket.
  <p>
  If the socket was bound prior to being {@link #close closed},
  then this method will continue to return the local address
  after the socket is closed.
  
  @return  the address to which this socket is bound,
  or <code>null</code> if the socket is unbound.