Example usage for org.apache.commons.httpclient.util URIUtil getPathQuery

List of usage examples for org.apache.commons.httpclient.util URIUtil getPathQuery

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.util URIUtil getPathQuery.

Prototype

public static String getPathQuery(String uri) 

Source Link

Document

Get the path and query of an URI.

Usage

From source file:org.elasticsearch.hadoop.rest.URIUtils.java

public static String addParam(String uri, String... param) {
    String pq = URIUtil.getPathQuery(uri);
    String fixedPq = pq.contains("?") ? pq.concat("&") : pq.concat("?");
    return uri.replace(pq, fixedPq + StringUtils.concatenate(param, "&"));
}