private boolean hasScheme(String uri) {
        int len = uri.length();
        for (int i = 0; i < len; i++) {
            char c = uri.charAt(i);
            if (c == ':') {
                return i > 0;
            } else if (!Character.isLetterOrDigit(c) &&
                    (c != '+' && c != '-' && c != '.')) {
                return false;
            }
        }
        return false;
    }
private boolean hasScheme ( String uri ) { int len = uri . length ( ) ; for ( int i = 0 ; i < len ; i ++ ) { char c = uri . charAt ( i ) ; if ( c == ':' ) { return i > 0 ; } else if ( ! Character . isLetterOrDigit ( c ) && ( c != '+' && c != '-' && c != '.' ) ) { return false ; } } return false ; }
Determine if a URI string has a <code>scheme</code> component.