com.beem.project.beem.smack.avatar
Interface AvatarCache

Package class diagram package AvatarCache
All Known Implementing Classes:
BeemAvatarCache, FileAvatarCache, MemoryAvatarCache

public interface AvatarCache

Interface for an AvatarCache. This can be improved to a generic cache.


Method Summary
 boolean contains(String id)
          Test if a data is in cache.
 byte[] get(String id)
          Get some data from the cache.
 void put(String id, byte[] data)
          Put some datas in cache.
 void put(String id, InputStream data)
          Put some datas in cache.
 

Method Detail

put

void put(String id,
         byte[] data)
         throws IOException
Put some datas in cache.

Parameters:
id - the key id of the data
data - the data to cache
Throws:
IOException - if an IO error occurs while caching the data

put

void put(String id,
         InputStream data)
         throws IOException
Put some datas in cache.

Parameters:
id - the key id of the data
data - an InputStream to the data to cache
Throws:
IOException - if an IO error occurs while caching the data

get

byte[] get(String id)
           throws IOException
Get some data from the cache.

Parameters:
id - the id of the data to get
Returns:
the cached data
Throws:
IOException - if an IO error occurs while geting the data

contains

boolean contains(String id)
Test if a data is in cache.

Parameters:
id - the id of the data
Returns:
true if data is in cache false otherwise


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