private void parseReference ( char [ ] array , int i , StringBuffer reference , StringBuffer parameters ) { int nb ; for ( boolean escaped = false ; i < array . length ; ++ i ) { char c = array [ i ] ; if ( ! escaped ) { if ( array [ i ] == ' ' && ! escaped ) { escaped = true ; } else if ( ( nb = countFirstChar ( array , i , ' ' ) ) >= 2 ) { for ( ; nb > 2 ; -- nb ) { reference . append ( array [ i ++ ] ) ; } i += 2 ; parameters . append ( array , i , array . length - i ) ; break ; } else { reference . append ( c ) ; } } else { reference . append ( c ) ; escaped = false ; } } }
Extract the link and the parameters .