common/src/main/java/HTTPClient/HTTPConnection.java
/**
     * Remove <var>host</var> from the list of hosts for which the proxy
     * should not be used. This modifies the same list that
     * <code>dontProxyFor()</code> uses, i.e. this is used to undo a
     * <code>dontProxyFor()</code> setting. The syntax for <var>host</var> is
     * specified in <code>dontProxyFor()</code>.
     *
     * @param host a host name, domain name, IP-address or IP-subnet.
     * @return true if the remove was sucessful, false otherwise
     * @exception ParseException if the length of the netmask does not match
     *                           the length of the IP-address
     * @see #dontProxyFor(java.lang.String)
     */
Remove host from the list of hosts for which the proxy
should not be used. This modifies the same list that
dontProxyFor() uses, i.e. this is used to undo a
dontProxyFor() setting. The syntax for host is
specified in dontProxyFor().

@param host a host name, domain name, IP-address or IP-subnet.
@return true if the remove was sucessful, false otherwise
@exception ParseException if the length of the netmask does not match
the length of the IP-address
@see #dontProxyFor(java.lang.String)
Remove host from the list of hosts for which the proxy should not be used . This modifies the same list that dontProxyFor () uses i . e . this is used to undo a dontProxyFor () setting . The syntax for host is specified in dontProxyFor () . @param host a host name domain name IP - address or IP - subnet . @return true if the remove was sucessful false otherwise @exception ParseException if the length of the netmask does not match the length of the IP - address @see #dontProxyFor ( java . lang . String )
public static boolean doProxyFor(String host)  throws ParseException
    {
	host = host.trim().toLowerCase();
	if (host.charAt(0) == '.')
	    return non_proxy_dom_list.removeElement(host);
	for (int idx=0; idx<host.length(); idx++)
	{
	    if (!Character.isDigit(host.charAt(idx))  &&
		host.charAt(idx) != '.'  &&  host.charAt(idx) != '/')
		return (non_proxy_host_list.remove(host) != null);
	}
	byte[] ip_addr;
	byte[] ip_mask;
	int slash;
	if ((slash = host.indexOf('/')) != -1)	
	{
	    ip_addr = string2arr(host.substring(0, slash));
	    ip_mask = string2arr(host.substring(slash+1));
	    if (ip_addr.length != ip_mask.length)
		throw new ParseException("length of IP-address (" +
				ip_addr.length + ") != length of netmask (" +
				ip_mask.length + ")");
	}
	else
	{
	    ip_addr = string2arr(host);
	    ip_mask = new byte[ip_addr.length];
	    for (int idx=0; idx<ip_mask.length; idx++)
		ip_mask[idx] = (byte) 255;
	}
	ip_loop: for (int idx=0; idx<non_proxy_addr_list.size(); idx++)
	{
	    byte[] addr = non_proxy_addr_list.elementAt(idx);
	    byte[] mask = non_proxy_mask_list.elementAt(idx);
	    if (addr.length != ip_addr.length)  continue;
	    for (int idx2=0; idx2<addr.length; idx2++)
	    {
		if ((ip_addr[idx2] & mask[idx2]) != (addr[idx2] & mask[idx2]) ||
		    (mask[idx2] != ip_mask[idx2]))
		    continue ip_loop;
	    }
	    non_proxy_addr_list.removeElementAt(idx);
	    non_proxy_mask_list.removeElementAt(idx);
	    return true;
	}
	return false;
    }
public static boolean doProxyFor ( String host ) throws ParseException { host = host . trim ( ) . toLowerCase ( ) ; if ( host . charAt ( 0 ) == '.' ) return non_proxy_dom_list . removeElement ( host ) ; for ( int idx = 0 ; idx < host . length ( ) ; idx ++ ) { if ( ! Character . isDigit ( host . charAt ( idx ) ) && host . charAt ( idx ) != '.' && host . charAt ( idx ) != '/' ) return ( non_proxy_host_list . remove ( host ) != null ) ; } byte [ ] ip_addr ; byte [ ] ip_mask ; int slash ; if ( ( slash = host . indexOf ( '/' ) ) != - 1 ) { ip_addr = string2arr ( host . substring ( 0 , slash ) ) ; ip_mask = string2arr ( host . substring ( slash + 1 ) ) ; if ( ip_addr . length != ip_mask . length ) throw new ParseException ( "length of IP-address (" + ip_addr . length + ") != length of netmask (" + ip_mask . length + ")" ) ; } else { ip_addr = string2arr ( host ) ; ip_mask = new byte [ ip_addr . length ] ; for ( int idx = 0 ; idx < ip_mask . length ; idx ++ ) ip_mask [ idx ] = ( byte ) 255 ; } ip_loop : for ( int idx = 0 ; idx < non_proxy_addr_list . size ( ) ; idx ++ ) { byte [ ] addr = non_proxy_addr_list . elementAt ( idx ) ; byte [ ] mask = non_proxy_mask_list . elementAt ( idx ) ; if ( addr . length != ip_addr . length ) continue ; for ( int idx2 = 0 ; idx2 < addr . length ; idx2 ++ ) { if ( ( ip_addr [ idx2 ] & mask [ idx2 ] ) != ( addr [ idx2 ] & mask [ idx2 ] ) || ( mask [ idx2 ] != ip_mask [ idx2 ] ) ) continue ip_loop ; } non_proxy_addr_list . removeElementAt ( idx ) ; non_proxy_mask_list . removeElementAt ( idx ) ; return true ; } return false ; }
Remove <var>host</var> from the list of hosts for which the proxy
 should not be used.
Remove <var > host< / var > from the list of hosts for which the proxy should not be used .
// check for domain name // check for host name // must be an IP-address // IP subnet