This example will show how to read an image such as png, gif, tiff or jpeg from a web page and save it programmatically using java, java 7 and guava. If you are looking to locate all images within a web page you could download the contents of a webpage and write a regex to find images within HTML to parse all the image locations. Once you get list of images you could perform the same operation to fetch the image. For a further challenge you could make the example more dynamic by getting the file name from the url and using it write it to the file system. If you are using a spring framework you could also leverage read a file using RestTemplate.