org.ozoneDB.blob
Class BLOBContainerImpl
java.lang.Object
|
+--org.ozoneDB.OzoneObject
|
+--org.ozoneDB.blob.BLOBContainerImpl
- All Implemented Interfaces:
- BLOBContainer, OzoneCompatible, OzoneCompatibleOrProxy, OzoneRemote, java.io.Serializable
- public class BLOBContainerImpl
- extends OzoneObject
- implements BLOBContainer
The BLOB implementation. The data are stored in several BLOBPages. The
data of the BLOB can be accessed through BLOBInOutputStreams.
- Version:
- $Revision: 1.1 $Date: 2001/12/18 10:31:30 $
- Author:
- SMB
- See Also:
- Serialized Form
Method Summary |
int |
available(int _index)
Returns the available bytes of this BLOB beginning at index. |
void |
init(int _pageSize)
|
void |
onDelete()
THIS MUST BE CALLED ON DELETE TO KILL ALL REFERENCED BLOBPAGES !
(hope the database does this for me...) |
byte[] |
read(int index,
int len)
|
void |
write(int _index,
byte[] b,
int off,
int len)
Writes the content of the Array into the BLOB starting at index. |
Methods inherited from class org.ozoneDB.OzoneObject |
container, database, deleteRecursive, getObjectID, handle, hashCode, onCreate, self, setContainer, toString, toXML |
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, wait, wait, wait |
BLOBContainerImpl
public BLOBContainerImpl()
init
public void init(int _pageSize)
- Specified by:
init
in interface BLOBContainer
available
public int available(int _index)
throws java.lang.Exception
- Returns the available bytes of this BLOB beginning at index.
NEVER WRITE ON BLOB WHILE EXECUTING THIS METHOD!
- Specified by:
available
in interface BLOBContainer
- Parameters:
_index
- the startposition
- Returns:
- the number of available bytes after _index
- Throws:
java.lang.Exception
- (some kind of databaseexception ?)
write
public void write(int _index,
byte[] b,
int off,
int len)
throws java.lang.Exception
- Writes the content of the Array into the BLOB starting at index.
- Specified by:
write
in interface BLOBContainer
- Parameters:
_index
- the write startposition in the BLOBb
- the bytearray to be storedoff
- the startindex in the bytearraylen
- the number of bytes to be written into the BLOB
- Throws:
java.lang.Exception
read
public byte[] read(int index,
int len)
throws java.lang.Exception
- Specified by:
read
in interface BLOBContainer
java.lang.Exception
onDelete
public void onDelete()
throws java.lang.Exception
- THIS MUST BE CALLED ON DELETE TO KILL ALL REFERENCED BLOBPAGES !
(hope the database does this for me...)
- Specified by:
onDelete
in interface OzoneCompatible
- Overrides:
onDelete
in class OzoneObject
java.lang.Exception
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.