for (char c : url.toCharArray()) {
if (!":/.?&#=".contains("" + c)) {
try {
res += URLEncoder.encode("" + c, "UTF-8");
} catch (UnsupportedEncodingException e) {
throw new CrawlerException(
"There is something really wrong with your JVM. It could not find UTF-8 encoding.", e);
}
} else {
res += c;
}