Android String to URL Convert isHttpUrl(String input)

Here you can find the source of isHttpUrl(String input)

Description

is Http Url

Declaration

public static boolean isHttpUrl(String input) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean isHttpUrl(String input) {
        if (!isNullOrEmpty(input)) {
            String regexExpression = "http://([\\w\\WW-]+\\.)+[\\w\\W-]+(/[\\w\\W- ./?%&=]*)?";
            if (input.matches(regexExpression)) {
                return true;
            }/*from ww  w. ja  v  a 2 s  .  c  om*/
        }

        return false;
    }

    public static boolean isNullOrEmpty(String input) {
        if (null == input || "".equals(input)) {
            return true;
        }
        return false;
    }
}

Related

  1. extracURL(String _str)
  2. isUrl(String s)
  3. isUrl(String str)
  4. isUrl(String s)
  5. isUrlValid(String str)
  6. getDomain(String url)
  7. findUrl(StringBuilder sb)
  8. isImageUrl(String imgUrl)
  9. getBaseUrl(String pageUrl)