Example usage for android.net Proxy validate

List of usage examples for android.net Proxy validate

Introduction

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

Prototype

public static int validate(String hostname, String port, String exclList) 

Source Link

Document

Validate syntax of hostname, port and exclusion list entries

Usage

From source file:android.net.ProxyInfo.java

/**
 * @hide/*from w  w  w  . java  2  s  . c  o m*/
 */
public boolean isValid() {
    if (!Uri.EMPTY.equals(mPacFileUrl))
        return true;
    return Proxy.PROXY_VALID == Proxy.validate(mHost == null ? "" : mHost,
            mPort == 0 ? "" : Integer.toString(mPort), mExclusionList == null ? "" : mExclusionList);
}