Java URL Query Build getQueryString(String url)

Here you can find the source of getQueryString(String url)

Description

get Query String

License

Open Source License

Declaration

protected static String getQueryString(String url) 

Method Source Code

//package com.java2s;
// Disable re-asking for license agreement (Firefox 3)

import java.net.MalformedURLException;
import java.net.URL;

public class Main {
    protected static String getQueryString(String url) {
        final String query;

        try {/*from  w w w.j  a v a2s  .  c o  m*/
            query = new URL(url).getQuery();
            return query == null ? "" : query;
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. getQueryParams(String url)
  2. getQueryString(final Map parameters)
  3. getQueryString(final Map parameters, final boolean encode)
  4. getQueryString(Map parameters)
  5. getQueryString(Map parameters)
  6. getQueryUrl(String word)
  7. getQueryUrl(String word, Integer page)
  8. getQueryURL(URL baseUrl, String[] parameters)
  9. getQueryValues(String input)