title: In Java, given an IP Address range, return the minimum list of CIDR blocks that covers the range
body: <p>I am having trouble with some of the logic in converting an IP Address range into a list of CIDR blocks. I do believe that this website is doing it right: <a href="http://ip2cidr.com/" rel="noreferrer">http://ip2cidr.com/</a></p>
  
  <p>I would like to pass in a starting IP address and an ending IP address and have the java spit out the minimum list of CIDR blocks required to cover only the range passed in and nothing more.</p>
  
  <p>For instance, if I pass in a start address of 1.1.1.111 and an end address of 1.1.1.120, I would expect to get in return:
  1.1.1.111/32
  1.1.1.112/29
  1.1.1.120/32</p>
  
  <p>(with the /32 indicating a single address.)</p>