List of usage examples for org.apache.commons.httpclient URI normalize
public void normalize() throws URIException
From source file:org.apache.any23.source.HTTPDocumentSource.java
private String normalize(String uri) throws URISyntaxException { try {/*from w ww . j a va2 s . co m*/ URI normalized = new URI(uri, DefaultHTTPClient.isUrlEncoded(uri)); normalized.normalize(); return normalized.toString(); } catch (URIException e) { LOG.warn("Invalid uri: {}", uri); LOG.error("Can not convert URL", e); throw new URISyntaxException(uri, e.getMessage()); } }