首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在Java中从Picasa Web API下载图像

如何在Java中从Picasa Web API下载图像
EN

Stack Overflow用户
提问于 2010-12-23 12:18:24
回答 1查看 2K关注 0票数 2

谷歌的开发人员指南解释了如何upload photos到Picasa Web相册,但是如何用Java语言下载图像文件,以便可以将其保存在本地计算机上?

EN

回答 1

Stack Overflow用户

发布于 2010-12-23 13:20:20

我对Picasa Web Albums API并不是很熟悉,但我认为只要看看Javadoc就可以了:

代码语言:javascript
运行
复制
// 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
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4515830

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档