title: What is the idiomatic way to compose a URL or URI in Java?
body: <p>How do I build a URL or a URI in Java? Is there an idiomatic way, or libraries that easily do this?</p>
  
  <p>I need to allow starting from a request string, parse/change various URL parts (scheme, host, path, query string) and support adding and automatically encoding query parameters.</p>