com.beem.project.beem.service
Class BeemAvatarCache

Package class diagram package BeemAvatarCache
java.lang.Object
  extended by com.beem.project.beem.service.BeemAvatarCache
All Implemented Interfaces:
AvatarCache

public class BeemAvatarCache
extends Object
implements AvatarCache

An implementation of an AvatarCache which store the data of the filesystem.


Constructor Summary
BeemAvatarCache(Context ctx)
          Create a BeemAvatarCache.
 
Method Summary
 boolean contains(String key)
          Test if a data is in cache.
 byte[] get(String key)
          Get some data from the cache.
 void put(String key, byte[] data)
          Put some datas in cache.
 void put(String key, InputStream in)
          Put some datas in cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeemAvatarCache

public BeemAvatarCache(Context ctx)
Create a BeemAvatarCache.

Parameters:
ctx - The android context of the cache.
Method Detail

put

public void put(String key,
                byte[] data)
         throws IOException
Description copied from interface: AvatarCache
Put some datas in cache.

Specified by:
put in interface AvatarCache
Parameters:
key - the key id of the data
data - the data to cache
Throws:
IOException - if an IO error occurs while caching the data

put

public void put(String key,
                InputStream in)
         throws IOException
Description copied from interface: AvatarCache
Put some datas in cache.

Specified by:
put in interface AvatarCache
Parameters:
key - the key id of the data
in - an InputStream to the data to cache
Throws:
IOException - if an IO error occurs while caching the data

get

public byte[] get(String key)
           throws IOException
Description copied from interface: AvatarCache
Get some data from the cache.

Specified by:
get in interface AvatarCache
Parameters:
key - the id of the data to get
Returns:
the cached data
Throws:
IOException - if an IO error occurs while geting the data

contains

public boolean contains(String key)
Description copied from interface: AvatarCache
Test if a data is in cache.

Specified by:
contains in interface AvatarCache
Parameters:
key - the id of the data
Returns:
true if data is in cache false otherwise


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