public boolean getKeepAlive() throws SocketException { if (impl == null) throw new SocketException("Not connected");
public boolean getKeepAlive() throws SocketException { if (isClosed()) throw new SocketException("socket is closed");
	public boolean getKeepAlive() throws SocketException {		if (impl == null)			throw new SocketException("Not connected");		Object buf = impl.getOption(SocketOptions.SO_KEEPALIVE);		if (buf instanceof Boolean)			return (((Boolean)buf).booleanValue());		else			throw new SocketException("Internal Error: Unexpected type");	}