2

Google のデベロッパー ガイドでは、Picasa ウェブ アルバムに写真をアップロードする方法を説明していますが、画像ファイルを Java でダウンロードしてローカル マシンに保存するにはどうすればよいでしょうか。

4

1 に答える 1

0

私は 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
}
于 2010-12-23T05:20:19.877 に答える