Here you can find the source of resolveReferenceStartingWithQueryString(final URI baseURI, final URI reference)
Parameter | Description |
---|---|
baseURI | the base URI |
reference | the URI reference starting with a query string |
private static URI resolveReferenceStartingWithQueryString(final URI baseURI, final URI reference)
//package com.java2s; //License from project: Apache License import java.net.*; public class Main { /**//from w ww .jav a 2s . co m * Resolves a reference starting with a query string. * * @param baseURI the base URI * @param reference the URI reference starting with a query string * @return the resulting URI */ private static URI resolveReferenceStartingWithQueryString(final URI baseURI, final URI reference) { String baseUri = baseURI.toString(); baseUri = baseUri.indexOf('?') > -1 ? baseUri.substring(0, baseUri.indexOf('?')) : baseUri; return URI.create(baseUri + reference.toString()); } }