[java] How to encode URL to avoid special characters in Java?