is String a Http or Https Url - Android java.net

Android examples for java.net:Http

Description

is String a Http or Https Url

Demo Code

import android.net.Uri;

public class Main{

    public static boolean isHttpUrl(String paramString) {
        boolean bool = false;
        if (paramString == null) {
        }/* w  ww . j  a v a  2  s  .  c  om*/
        for (;;) {
            return bool;
            String str = Uri.parse(paramString).getScheme();
            if (("http".equalsIgnoreCase(str))
                    || ("https".equalsIgnoreCase(str))) {
                bool = true;
            }
        }
    }

}

Related Tutorials