Here you can find the source of queryComponent(String url)
public static String queryComponent(String url)
//package com.java2s; public class Main { /** Grabs query component only from url. If no query component, returns null.*/ public static String queryComponent(String url) { int queryStart = url.indexOf("?"); if (queryStart == -1) return null; return url.substring(queryStart + 1); }/* w w w.j a v a2s .c o m*/ }