这是代码:
Transport t = new REST();Flickr f = new Flickr("key", "secret", t);PhotoList list = f.getPhotosetsInterface().getPhotos("setId", 100, 1);for (Iterator iterator = list.iterator(); iterator.hasNext();) { Photo photo = (Photo) iterator.next(); File file = new File("/tmp/" + photo.getId() + ".jpg"); ByteArrayOutputStream b = new ByteArrayOutputStream(); b.write(photo.getOriginalAsStream()); FileUtils.writeByteArrayToFile(file, b.toByteArray());}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)