private void parseAuthority(byte[] data, int start) {
        // authority is [userinfo@] host [:port] "/URI"
        if (start >= data.length) {
            // nothing after the "//" which is invalid
            throw new IllegalArgumentException("Invalid authority: " + GenericUtils.getEnglishString(data));
        }
        int i = start;
        int host_start = start;
        int slash_start = data.length;
        for (; i < data.length; i++) {
            // find either a "@" or "/"
            if ('@' == data[i]) {
                // Note: we're just cutting off the userinfo section for now
                host_start = i + 1;
            } else if ('/' == data[i]) {
                slash_start = i;
                break;
            }
        }
        parseURLHost(data, host_start, slash_start);
        parseURI(data, slash_start);
    }
private void parseAuthority ( byte [ ] data , int start ) { if ( start >= data . length ) { throw new IllegalArgumentException ( "Invalid authority: " + GenericUtils . getEnglishString ( data ) ) ; } int i = start ; int host_start = start ; int slash_start = data . length ; for ( ; i < data . length ; i ++ ) { if ( '@' == data [ i ] ) { host_start = i + 1 ; } else if ( '/' == data [ i ] ) { slash_start = i ; break ; } } parseURLHost ( data , host_start , slash_start ) ; parseURI ( data , slash_start ) ; }
Parse the authority information out that followed a "//" marker. Once
that data is saved, then it starts the parse for the remaining info in
the URL. If any format errors are encountered, then an exception is thrown.

@param data
@param start
@throws IllegalArgumentException