List of usage examples for org.springframework.web.util UriComponents encode
public abstract UriComponents encode(Charset charset);
From source file:de.blizzy.documentr.markdown.macro.impl.GoogleDocsMacro.java
private String toUrl(UriComponents components) { try {/*from ww w . j a v a 2 s . c o m*/ return components.encode(Charsets.UTF_8.name()).toUriString(); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }