2

Google 的开发人员指南说明了如何将照片上传到 Picasa 网络相册,但是如何下载 Java 格式的图像文件以便将其保存在本地计算机上?

4

1 回答 1

0

我对 Picasa 网络相册 API 并不十分熟悉,但我认为只要查看 Javadocs 就可以做到这一点:

// 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
}
于 2010-12-23T05:20:19.877 回答