private boolean isOpaque(String uri) {
        int colonIndex = uri.indexOf(":");

        if (colonIndex < 0) {
            return true;
        } else {
            return !(uri.length() > colonIndex + 1
                    && uri.charAt(colonIndex + 1) == '/');
        }
    }
Returns whether an url is opaque or hierarchical
vespajlib/src/main/java/com/yahoo/net/URI.java