Example usage for android.net ProxyInfo ProxyInfo

List of usage examples for android.net ProxyInfo ProxyInfo

Introduction

In this page you can find the example usage for android.net ProxyInfo ProxyInfo.

Prototype

private ProxyInfo(String host, int port, String exclList, String[] parsedExclList) 

Source Link

Usage

From source file:android.net.ProxyInfo.java

/**
 * Constructs a {@link ProxyInfo} object that points at a Direct proxy
 * on the specified host and port.//from   w ww  . j ava 2  s  .  c o m
 *
 * The proxy will not be used to access any host in exclusion list, exclList.
 *
 * @param exclList Hosts to exclude using the proxy on connections for.  These
 *                 hosts can use wildcards such as *.example.com.
 */
public static ProxyInfo buildDirectProxy(String host, int port, List<String> exclList) {
    String[] array = exclList.toArray(new String[exclList.size()]);
    return new ProxyInfo(host, port, TextUtils.join(",", array), array);
}