Package javax.servlet.sip

Examples of javax.servlet.sip.URI.removeParameter()


    URI orig = new URIImpl("http://www.nexcom.fr;user=me");
    URI readOnly = new ReadOnlyURI((URI) orig.clone());
   
    assertEquals(orig, readOnly);
    try { readOnly.setParameter("foo", "bar"); fail();} catch (IllegalStateException e) {}
    try { readOnly.removeParameter("user");   fail();} catch (IllegalStateException e) {}
    assertEquals(orig, readOnly);
    assertEquals(readOnly, orig);
    assertEquals(orig.toString(), readOnly.toString());
    URI clone = (URI) readOnly.clone();
    clone.setParameter("a", "b");
View Full Code Here


  {
    URI uri = URIFactory.parseURI("http://www.nexcom.fr;param1=a");
    assertEquals("http://www.nexcom.fr;param1=a", uri.toString());
    uri.setParameter("param2", "b");
    assertEquals("a", uri.getParameter("param1"));
    uri.removeParameter("param1");
    assertEquals("b", uri.getParameter("param2"));
    assertNull(uri.getParameter("param1"));
    assertEquals("http://www.nexcom.fr;param2=b", uri.toString());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.