谷歌的开发人员指南解释了如何upload photos到Picasa Web相册,但是如何用Java语言下载图像文件,以便可以将其保存在本地计算机上?
发布于 2010-12-23 13:20:20
我对Picasa Web Albums API并不是很熟悉,但我认为只要看看Javadoc就可以了:
// read all photos from an album
URL feedUrl = "https://picasaweb.google.com/data/feed/api/user/username/albumid/albumid";
AlbumFeed feed = myService.getFeed(feedUrl, AlbumFeed.class);
for(PhotoEntry photo : feed.getPhotoEntries()) {
MediaSource mediaSource = photo.getMediaSource();
InputStream photoInputStream = mediaSource.getInputStream();
// read from the photoInputStream here to get contents of photo
}
https://stackoverflow.com/questions/4515830
复制相似问题