com.beem.project.beem.smack.avatar
Class HttpClientAvatarRetriever

Package class diagram package HttpClientAvatarRetriever
java.lang.Object
  extended by com.beem.project.beem.smack.avatar.HttpClientAvatarRetriever
All Implemented Interfaces:
AvatarRetriever

public class HttpClientAvatarRetriever
extends Object
implements AvatarRetriever

An AvatarRetriever which retrieve the avatar over HTTP using the Apache HttpClient.


Constructor Summary
HttpClientAvatarRetriever(HttpClient client, String url)
          Create a HttpAvatarRetriever.
HttpClientAvatarRetriever(String url)
          Create a HttpAvatarRetriever.
 
Method Summary
 byte[] getAvatar()
          Retrieve the avatar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientAvatarRetriever

public HttpClientAvatarRetriever(HttpClient client,
                                 String url)
Create a HttpAvatarRetriever.

Parameters:
client - the custom HttpClient to use to downlowad
url - the url of the avatar to download.

HttpClientAvatarRetriever

public HttpClientAvatarRetriever(String url)
Create a HttpAvatarRetriever.

Parameters:
url - the url of the avatar to download.
Method Detail

getAvatar

public byte[] getAvatar()
                 throws IOException
Description copied from interface: AvatarRetriever
Retrieve the avatar.

Specified by:
getAvatar in interface AvatarRetriever
Returns:
the avatar
Throws:
IOException - if an IO error occurs while retrieving the avatar


Copyright © 2009 Beem-project.com. All Rights Reserved.