public InetAddress getLocalAddress() { if (impl == null) return null;
public InetAddress getLocalAddress() { if (! isBound()) return InetAddress.ANY_IF;
	public InetAddress getLocalAddress() {		if (impl == null)			return null;		InetAddress addr = null;		try {			addr = (InetAddress)impl.getOption(SocketOptions.SO_BINDADDR);		} catch (SocketException e) {			// (hopefully) shouldn't happen			// throw new java.lang.InternalError			//      ("Error in PlainSocketImpl.getOption");			return null;		}		// FIXME: According to libgcj, checkConnect() is supposed to be called		// before performing this operation.  Problems: 1) We don't have the		// addr until after we do it, so we do a post check.  2). The docs I		// see don't require this in the Socket case, only DatagramSocket, but		// we'll assume they mean both.		SecurityManager sm = System.getSecurityManager();		if (sm != null)			sm.checkConnect(addr.getHostName(), getLocalPort());		return addr;	}