private static String decodeComponent(String s, String charset){
        if(s == null){
            return "";
        }

        try{
            return URLDecoder.decode(s, charset);
        }catch(UnsupportedEncodingException e){
            throw new UnsupportedCharsetException(charset);
        }
    }