2010-12-23 50 views

回答

0

我真的没有与Picasa网络相册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 
} 
+0

我的自我评论道歉,但你可以使用MediaSource.getContentType()方法来找出你有什么类型的文件。 – salexander 2010-12-23 05:22:07