Class InMemBundlePersistenceManager.InMemBLOBStore
- java.lang.Object
-
- org.apache.jackrabbit.core.persistence.mem.InMemBundlePersistenceManager.InMemBLOBStore
-
- All Implemented Interfaces:
InMemBundlePersistenceManager.CloseableBLOBStore,BLOBStore
- Enclosing class:
- InMemBundlePersistenceManager
protected class InMemBundlePersistenceManager.InMemBLOBStore extends Object implements InMemBundlePersistenceManager.CloseableBLOBStore
-
-
Constructor Summary
Constructors Constructor Description InMemBLOBStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringcreateId(PropertyId id, int index)Creates a unique identifier for the BLOB data associated with the given property id and value subscript.InputStreamget(String blobId)Retrieves the BLOB data with the specified id as a binary stream.voidput(String blobId, InputStream in, long size)Stores the BLOB data and returns a unique identifier.booleanremove(String blobId)Removes the BLOB data with the specified id.
-
-
-
Method Detail
-
createId
public String createId(PropertyId id, int index)
Creates a unique identifier for the BLOB data associated with the given property id and value subscript.
-
put
public void put(String blobId, InputStream in, long size) throws Exception
Stores the BLOB data and returns a unique identifier.- Specified by:
putin interfaceBLOBStore- Parameters:
blobId- identifier of the BLOB data as returned byBLOBStore.createId(PropertyId, int)in- stream containing the BLOB datasize- size of the BLOB data- Throws:
Exception- if an error occured
-
get
public InputStream get(String blobId) throws Exception
Retrieves the BLOB data with the specified id as a binary stream.- Specified by:
getin interfaceBLOBStore- Parameters:
blobId- identifier of the BLOB data as returned byBLOBStore.createId(PropertyId, int)- Returns:
- an input stream that delivers the BLOB data
- Throws:
Exception- if an error occured
-
remove
public boolean remove(String blobId) throws Exception
Removes the BLOB data with the specified id.- Specified by:
removein interfaceBLOBStore- Parameters:
blobId- identifier of the BLOB data as returned byBLOBStore.createId(PropertyId, int)- Returns:
trueif BLOB data with the given id exists and has been successfully removed,falseif there's no BLOB data with the given id.- Throws:
Exception- if an error occured
-
close
public void close()
- Specified by:
closein interfaceInMemBundlePersistenceManager.CloseableBLOBStore
-
-