Here you can find the source of getQueryUrl(final String url)
public static URL getQueryUrl(final String url)
//package com.java2s; import java.net.URI; import java.net.URL; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; public class Main { public static URL getQueryUrl(final String url) { URL queryUrl = null;//w w w . j av a2s . c om try { List<NameValuePair> queries = URLEncodedUtils.parse( new URI(url), "UTF-8"); for (NameValuePair pair : queries) { if ("url".equals(pair.getName())) { queryUrl = new URL(pair.getValue()); } } } catch (Exception e) { e.printStackTrace(); } return queryUrl; } }