Code example for Proxy

Methods: type

0
     *        whether using SOCKS proxy. 
     * @return true if only the type of <code>proxy</code> is 
     *         Proxy.Type.SOCKS. 
     */ 
    public static boolean usingSocks(Proxy proxy) {
        if (null != proxy && Proxy.Type.SOCKS == proxy.type()) {
            return true; 
        } 
        return false; 
    } 
 
    /** 
     * Answer whether to prefer IPV6 address 
     *  
     * @return boolean 
     */ 
    public static boolean preferIPv6Addresses() { 
        final Action a = new Action("java.net.preferIPv6Addresses");//$NON-NLS-1$
        return AccessController.doPrivileged(a).booleanValue();
    }