org.apache.jackrabbit.core.value
Class BLOBInDataStore

java.lang.Object
  extended by org.apache.jackrabbit.core.value.BLOBFileValue
      extended by org.apache.jackrabbit.core.value.BLOBInDataStore

public class BLOBInDataStore
extends BLOBFileValue

Represents binary data which is stored in the data store.


Method Summary
 void delete(boolean pruneEmptyParentDirs)
          Deletes the persistent resource backing this BLOBFileValue.
 void discard()
          Frees temporarily allocated resources such as temporary file, buffer, etc.
 boolean equals(Object obj)
          
 DataIdentifier getDataIdentifier()
          Get the data identifier if one is available.
 long getLength()
          Returns the length of this BLOBFileValue.
 InputStream getStream()
          Returns an InputStream representation of this value.
 int hashCode()
          Returns zero to satisfy the Object equals/hashCode contract.
 boolean isImmutable()
          Checks if this object is immutable.
 boolean isSmall()
          Check if the value is small (contains a low number of bytes) and should be stored inline.
 String toString()
          
 
Methods inherited from class org.apache.jackrabbit.core.value.BLOBFileValue
spool
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

delete

public void delete(boolean pruneEmptyParentDirs)
Description copied from class: BLOBFileValue
Deletes the persistent resource backing this BLOBFileValue.

Specified by:
delete in class BLOBFileValue
Parameters:
pruneEmptyParentDirs - if true, empty parent directories will automatically be deleted

discard

public void discard()
Description copied from class: BLOBFileValue
Frees temporarily allocated resources such as temporary file, buffer, etc. If this BLOBFileValue is backed by a persistent resource calling this method will have no effect.

Specified by:
discard in class BLOBFileValue
See Also:
BLOBFileValue.delete(boolean)

getDataIdentifier

public DataIdentifier getDataIdentifier()
Description copied from class: BLOBFileValue
Get the data identifier if one is available.

Overrides:
getDataIdentifier in class BLOBFileValue
Returns:
the data identifier or null

isImmutable

public boolean isImmutable()
Checks if this object is immutable. Immutable objects can not change and can safely copied.

Specified by:
isImmutable in class BLOBFileValue
Returns:
true if the object is immutable

equals

public boolean equals(Object obj)
Description copied from class: BLOBFileValue

Specified by:
equals in class BLOBFileValue

hashCode

public int hashCode()
Returns zero to satisfy the Object equals/hashCode contract. This class is mutable and not meant to be used as a hash key.

Specified by:
hashCode in class BLOBFileValue
Returns:
always zero
See Also:
Object.hashCode()

getLength

public long getLength()
Description copied from class: BLOBFileValue
Returns the length of this BLOBFileValue.

Specified by:
getLength in class BLOBFileValue
Returns:
The length, in bytes, of this BLOBFileValue, or -1L if the length can't be determined.

getStream

public InputStream getStream()
                      throws RepositoryException
Description copied from class: BLOBFileValue
Returns an InputStream representation of this value.

Specified by:
getStream in class BLOBFileValue
Returns:
An InputStream representation of this value.
Throws:
RepositoryException

toString

public String toString()

Specified by:
toString in class BLOBFileValue

isSmall

public boolean isSmall()
Description copied from class: BLOBFileValue
Check if the value is small (contains a low number of bytes) and should be stored inline.

Specified by:
isSmall in class BLOBFileValue
Returns:
true if the value is small


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.