Java code for Flickr