@Test public void testURI() { URI uri = URI.create("http: QueryStringDecoder decoder = new QueryStringDecoder(uri); Assert.assertEquals("/foo", decoder.path()); Assert.assertEquals("/foo", decoder.rawPath()); Assert.assertEquals("param1=value1&param2=value2&param3=value3", decoder.rawQuery()); Map<String, List<String>> params = decoder.parameters(); Assert.assertEquals(3, params.size()); Iterator<Entry<String, List<String>>> entries = params.entrySet().iterator(); Entry<String, List<String>> entry = entries.next(); Assert.assertEquals("param1", entry.getKey()); Assert.assertEquals(1, entry.getValue().size()); Assert.assertEquals("value1", entry.getValue().get(0)); entry = entries.next(); Assert.assertEquals("param2", entry.getKey()); Assert.assertEquals(1, entry.getValue().size()); Assert.assertEquals("value2", entry.getValue().get(0)); entry = entries.next(); Assert.assertEquals("param3", entry.getKey()); Assert.assertEquals(1, entry.getValue().size()); Assert.assertEquals("value3", entry.getValue().get(0)); Assert.assertFalse(entries.hasNext()); }
public String uri() { return uri; }
QueryStringDecoder { public String uri() { return uri; } }
QueryStringDecoder { public String uri() { return uri; } QueryStringDecoder(String uri);  QueryStringDecoder(String uri, boolean hasPath);  QueryStringDecoder(String uri, Charset charset);  QueryStringDecoder(String uri, Charset charset, boolean hasPath);  QueryStringDecoder(String uri, Charset charset, boolean hasPath, int maxParams);  QueryStringDecoder(URI uri);  QueryStringDecoder(URI uri, Charset charset);  QueryStringDecoder(URI uri, Charset charset, int maxParams); }
QueryStringDecoder { public String uri() { return uri; } QueryStringDecoder(String uri);  QueryStringDecoder(String uri, boolean hasPath);  QueryStringDecoder(String uri, Charset charset);  QueryStringDecoder(String uri, Charset charset, boolean hasPath);  QueryStringDecoder(String uri, Charset charset, boolean hasPath, int maxParams);  QueryStringDecoder(URI uri);  QueryStringDecoder(URI uri, Charset charset);  QueryStringDecoder(URI uri, Charset charset, int maxParams); @Override String toString(); String uri(); String path(); Map<String, List<String>> parameters(); String rawPath(); String rawQuery(); static String decodeComponent(final String s); static String decodeComponent(final String s, final Charset charset); }
QueryStringDecoder { public String uri() { return uri; } QueryStringDecoder(String uri);  QueryStringDecoder(String uri, boolean hasPath);  QueryStringDecoder(String uri, Charset charset);  QueryStringDecoder(String uri, Charset charset, boolean hasPath);  QueryStringDecoder(String uri, Charset charset, boolean hasPath, int maxParams);  QueryStringDecoder(URI uri);  QueryStringDecoder(URI uri, Charset charset);  QueryStringDecoder(URI uri, Charset charset, int maxParams); @Override String toString(); String uri(); String path(); Map<String, List<String>> parameters(); String rawPath(); String rawQuery(); static String decodeComponent(final String s); static String decodeComponent(final String s, final Charset charset);  }