org.apache.jackrabbit.core.value
Class RefCountingBLOBFileValue
java.lang.Object
org.apache.jackrabbit.core.value.RefCountingBLOBFileValue
- All Implemented Interfaces:
- Binary
public class RefCountingBLOBFileValue
- extends Object
RefCountingBLOBFileValue
implements a reference counting BLOB
file value on top of an existing BLOBFileValue
. Whenever a
copy()
is created from this BLOB file value, a new light weight
RefCountBinary
is created and the reference count refCount
is incremented. The underlying value is discarded once this
RefCountingBLOBFileValue
and all its light weight
RefCountBinary
intances have been discarded.
Constructor Summary |
RefCountingBLOBFileValue(org.apache.jackrabbit.core.value.BLOBFileValue value)
Creates a new reference counting blob file value based on the given
value . |
RefCountingBLOBFileValue
public RefCountingBLOBFileValue(org.apache.jackrabbit.core.value.BLOBFileValue value)
- Creates a new reference counting blob file value based on the given
value
.
- Parameters:
value
- the underlying value.
dispose
public void dispose()
- Discards the underyling value if the reference count drops to zero.
equals
public boolean equals(Object obj)
toString
public String toString()
hashCode
public int hashCode()
getSize
public long getSize()
throws RepositoryException
- Throws:
RepositoryException
getStream
public InputStream getStream()
throws RepositoryException
- Throws:
RepositoryException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
read
public int read(byte[] b,
long position)
throws IOException,
RepositoryException
- Specified by:
read
in interface Binary
- Throws:
IOException
RepositoryException
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.