The drafters of the module decided that the standard UDK class should be used instead :
The reason URIs and URIUtils is replaced by the standard Java URI is very simple: no one wanted to support these classes.
There are several useful methods that help problems with the implementation of java.net.URI, but otherwise the standard JRE class should be sufficient, right?
So, the easiest way is to look at the source of encodePath from release 3.1 and duplicate what it does in its own code (or just copy the method / class to your code base).
Or you can go with the accepted answer to the question you were talking about (but it seems you need to split the URL first into parts):
new URI( "http", "search.barnesandnoble.com", "/booksearch/first book.pdf", null).toString();
Thilo Apr 09 2018-10-09T00: 00Z
source share