Java Utililty Methods URL is Absolute

List of utility methods to do URL is Absolute

Description

The list of methods to do URL is Absolute are organized into topic(s).

Method

booleanisAbsolute(String uri)
is Absolute
boolean result = false;
if (uri != null) {
    int index = uri.indexOf(PROTOCOL_PATTERN);
    if (index != -1 || uri.startsWith("/") || uri.startsWith("\\")) {
        result = true;
return result;
...
booleanisAbsoluteUri(String s)
Efficiently determines whether a URL is of the pattern "xxx://xxx"
if (isEmpty(s))
    return false;
int S1 = 1; 
int S2 = 2; 
int S3 = 3; 
int S4 = 4; 
int S5 = 5; 
int state = S1;
...
booleanisAbsoluteURI(String source)
Checks whether the given string is a valid URI .
int schemeSepIdx = source.indexOf(':');
if ((schemeSepIdx < 0) || (source.indexOf(' ') > -1) || (source.indexOf('|') > 0)) {
    return false;
} else {
    String rest = source.contains("//") ? source.substring(schemeSepIdx + 3)
            : source.substring(schemeSepIdx + 1);
    return parse(rest);
booleanisAbsoluteURI(String uri)
is Absolute URI
return uri.matches("\\w+://.*");
booleanisAbsoluteURI(String uri)
Checks if a given string is an absolute URI if it is an URI.
int len = uri.length();
if (len == 0)
    return true; 
if (len < 2)
    return false;
char ch = uri.charAt(0);
if (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')) {
    for (int i = 1; i < len; i++) {
...
booleanisAbsoluteUrl(String imageUrl)
is Absolute Url
if (imageUrl.startsWith("http://") || imageUrl.startsWith("https://") || imageUrl.startsWith("ftp://")) {
    return true;
return false;
booleanisAbsoluteUrl(String ref)
is Absolute Url
return ref.startsWith("http:") || ref.startsWith("https:") || ref.startsWith("urn:uuid:")
        || ref.startsWith("urn:oid:");
booleanisAbsoluteURL(String str)
Check if the given url string is the absolute URL starting with / and without protocol nor host portion
return (str.startsWith("/") && !str.startsWith("//"));
booleanisAbsoluteURL(String url)
is Absolute URL
return url != null && url.indexOf("://") >= 0;
booleanisAbsoluteUrl(String url)
<#if locale="en">

Return the url is absolute url or not.

if (url == null) {
    return false;
int colonPos;
if ((colonPos = url.indexOf(":")) == -1) {
    return false;
for (int i = 0; i < colonPos; i++) {
...