public String encodeUrl ( ) { // Use the URI class to properly URL encode the value. try { URI valueUri = new URI ( null , null , value , null ) ; return key + "=" + valueUri . toString ( ) ; } catch ( URISyntaxException e ) { // This should really never happen... return key + "=" + "value" ; } }
Get a String representation of this instance for use in URLs .