Encode URL parameters using Java
<p>I want to encode part of URL paramter in JAVA</p>

<pre><code>http://statebuild-dev.com/iit-title/size.xml?id=(102T OR 140T)
</code></pre>

<p>to </p>

<pre><code>http://statebuild-dev.com/iit-title/size.xml?id=(102%20OR%20140)
</code></pre>

<p>have tried using URI to encode but it also encodes ? which I do not want. In the URL I want to encode the part after '=' </p>

<pre><code>URI uri = new URI("http", 
    "statebuild-dev.com/iit-title", "/size.xml?id=(102 OR 140)", null);
//URL url = uri.toURL();
System.out.println(uri.toString());
System.out.println(url1);
</code></pre>

<p>Thank You</p>
