question: private static String escapeExcludedChars ( String unescaped ) { final StringBuilder escaped = new StringBuilder ( ) ; for ( int i = 0 ; i < unescaped . length ( ) ; i ++ ) { char c = unescaped . charAt ( i ) ; if ( ! isUnreserved ( c ) && ! reserved . contains ( c ) ) { escaped . append ( "%" + Integer . toHexString ( ( int ) c ) ) ; } else { escaped . append ( c ) ; } } return escaped . toString ( ) ; }
target:  Escapes any character that is not either reserved or in the legal range of unreserved characters, according to RFC 2396.