org.fjank.jcache
Class StreamCacheObject
java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.WeakReference
org.fjank.jcache.CacheObject
org.fjank.jcache.StreamCacheObject
public class StreamCacheObject
- extends CacheObject
A cacheobject which reads/writes the content with the aid of Input/Outputstreams
Contains an internal reference to the wrapped object,
so the override of SoftReference is probably broken on this object...
- Author:
- Frank Karlstrøm
Methods inherited from class org.fjank.jcache.CacheObject |
clear, destroy, equals, get, getAccesses, getAttributes, getGroup, getKey, getRefCount, getRegion, invalidate, needsLoading, resetRefCount, setAttributes, setAttributes, toString |
StreamCacheObject
public StreamCacheObject(Object key,
Object referent,
CacheGroup group,
CacheRegion region,
ReferenceQueue q)
throws CacheException
- Creates a new StreamCacheObject object.
- Parameters:
key
- the name of this objectreferent
- the actuall objectgroup
- the group this object belongs toq
- the ReferenceQueue this object goes to wneh the GC determines
that this object is garbage.
- Throws:
CacheException
getInputStream
public InputStream getInputStream()
throws ObjectNotFoundException
- Overrides the normal get method by getting the Object,
then creating an InputStream to this object.
- Throws:
ObjectNotFoundException
getOutputStream
public OutputStream getOutputStream()
throws InvalidArgumentException
- gets an OutputStream to write to this object.
- Returns:
-
- Throws:
InvalidArgumentException
Copyright © 2002-2009 Hosted by SourceForge. All Rights Reserved.