private static URI createUri(String authority, String uri) {
        String scheme = "https";
        int schemeEnd = uri.indexOf(':');
        int pathStart = uri.indexOf('/');
        if (schemeEnd >= 0 && schemeEnd < pathStart) {
            scheme = uri.substring(0, schemeEnd);
            if (uri.charAt(pathStart + 1) == '/') {
                authority = uri.substring(pathStart);
                pathStart = uri.indexOf('/', pathStart + 2);
            }
        }

        String path;
        String query;
        int queryIdx = uri.indexOf('?', pathStart);
        if (queryIdx < 0) {
            query = null;
            path = uri.substring(pathStart);
        } else {
            query = uri.substring(queryIdx + 1);
            path = uri.substring(pathStart, queryIdx);
        }
        try {
            return new URI(scheme, authority, path, query, null);
        } catch (URISyntaxException e) {
            throw new UndeclaredThrowableException(e);
        }
    }
The state of an aws sigV4 request.

@author chas
@since 2016-12-9
src/main/java/io/fabric8/maven/docker/access/ecr/AwsSigner4Request.java