Package 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
RefCountingBLOBFileValueimplements a reference counting BLOB file value on top of an existingBLOBFileValue. Whenever acopy()is created from this BLOB file value, a new light weightRefCountingBLOBFileValue.RefCountBinaryis created and the reference countrefCountis incremented. The underlying value is discarded once thisRefCountingBLOBFileValueand all its light weightRefCountingBLOBFileValue.RefCountBinaryinstances have been discarded.
-
-
Constructor Summary
Constructors Constructor Description RefCountingBLOBFileValue(org.apache.jackrabbit.core.value.BLOBFileValue value)Creates a new reference counting blob file value based on the givenvalue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Discards the underlying value if the reference count drops to zero.booleanequals(Object obj)protected voidfinalize()longgetSize()InputStreamgetStream()inthashCode()intread(byte[] b, long position)StringtoString()
-
-
-
Method Detail
-
dispose
public void dispose()
Discards the underlying 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
-
read
public int read(byte[] b, long position) throws IOException, RepositoryException- Specified by:
readin interfaceBinary- Throws:
IOExceptionRepositoryException
-
-