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
RefCountingBLOBFileValue
implements a reference counting BLOB file value on top of an existingBLOBFileValue
. Whenever acopy()
is created from this BLOB file value, a new light weightRefCountingBLOBFileValue.RefCountBinary
is created and the reference countrefCount
is incremented. The underlying value is discarded once thisRefCountingBLOBFileValue
and all its light weightRefCountingBLOBFileValue.RefCountBinary
instances 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 void
dispose()
Discards the underlying value if the reference count drops to zero.boolean
equals(Object obj)
protected void
finalize()
long
getSize()
InputStream
getStream()
int
hashCode()
int
read(byte[] b, long position)
String
toString()
-
-
-
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:
read
in interfaceBinary
- Throws:
IOException
RepositoryException
-
-