core/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java
/**
     * Extracts the user info from a URI.  The scheme:// part has been removed
     * already.
     */
Extracts the user info from a URI.  The scheme:// part has been removed
already.
Extracts the user info from a URI . The scheme : // part has been removed already .
protected String extractUserInfo(final StringBuilder name)
    {
        final int maxlen = name.length();
        for (int pos = 0; pos < maxlen; pos++)
        {
            final char ch = name.charAt(pos);
            if (ch == '@')
            {
                String userInfo = name.substring(0, pos);
                name.delete(0, pos + 1);
                return userInfo;
            }
            if (ch == '/' || ch == '?')
            {
                break;
            }
        }
        return null;
    }
protected String extractUserInfo ( final StringBuilder name ) { final int maxlen = name . length ( ) ; for ( int pos = 0 ; pos < maxlen ; pos ++ ) { final char ch = name . charAt ( pos ) ; if ( ch == '@' ) { String userInfo = name . substring ( 0 , pos ) ; name . delete ( 0 , pos + 1 ) ; return userInfo ; } if ( ch == '/' || ch == '?' ) { break ; } } return null ; }
Extracts the user info from a URI.
Extracts the user info from a URI .
// Found the end of the user info // Not allowed in user info // Not found