|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openmobileis.database.fastobjectdb.db.store.FODBCollectionFile
FODBCollectionFile is a Class that defines simple functions access our data file.
Method Summary | |
long |
addIndex(long indexPos)
Add an index to the indexs table. |
static FODBCollectionFile |
createCollection(java.lang.String filePath,
java.lang.Class objType,
java.lang.String colname,
FastObjectDB db)
The function that is called to create a new Collection file. |
void |
deleteObject(long pos)
Delete an Object |
FODBCypher |
getCollectionCypher()
return the collection cypher if any, null otherwise. |
FODBIndexHeader[] |
getIndexsHeaders()
Read the indexs table. |
java.lang.Class |
getObjectType()
|
boolean |
isSynchronized()
|
static FODBCollectionFile |
openCollection(java.lang.String filePath,
java.lang.String colname,
FastObjectDB db)
The function that is called to open an existing Collection file. |
FODBCollectionFileHeader |
readHeader()
Read the header which is situated at the beginning of the collection file and return it. |
java.lang.Object |
readNode(long pos)
Read Object at pos. |
java.lang.Object |
readObject(long pos)
Read Object at pos. |
void |
rewriteHeader()
|
void |
rewriteNode(java.lang.Object obj,
long pos)
Rewrite an object The object has to be the same size it used to be. |
void |
rewriteObjectt(java.lang.Object obj,
long pos)
Rewrite an object The object has to be the same size it used to be. |
void |
setCollectionCypher(FODBCypher cypher)
Init collection encryption with the specified cypher. |
void |
setSynchronized(boolean sync)
|
java.lang.String |
toString()
Used for debugging. |
void |
writeHeader()
Write the header at the beginning of the collection file. |
long |
writeNode(java.lang.Object obj)
Write an object. |
long |
writeObject(java.lang.Object obj)
Write an object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public boolean isSynchronized()
public FODBCypher getCollectionCypher() throws FODBException
public void setCollectionCypher(FODBCypher cypher) throws FODBException
cypher
- : cypher to be use to encrypt data.public void setSynchronized(boolean sync) throws java.io.IOException, java.lang.ClassNotFoundException
public static FODBCollectionFile createCollection(java.lang.String filePath, java.lang.Class objType, java.lang.String colname, FastObjectDB db) throws java.io.IOException, java.lang.ClassNotFoundException
filePath
- - same as constructorobjType
- - same as constructorFODBDataFileException
- public static FODBCollectionFile openCollection(java.lang.String filePath, java.lang.String colname, FastObjectDB db) throws java.io.IOException, java.lang.ClassNotFoundException
filePath
- - same as constructorFODBDataFileException
- public long addIndex(long indexPos) throws java.io.IOException, java.lang.ClassNotFoundException
indexPos
- - position of the new index in the file.FODBDataFileException
- public java.lang.Object readNode(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to read.FODBDataFileException
- public long writeNode(java.lang.Object obj) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to wright.FODBDataFileException
- public void rewriteNode(java.lang.Object obj, long pos) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to writepos
- - position in the collection file.FODBDataFileException
- public java.lang.Object readObject(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to read.FODBDataFileException
- public long writeObject(java.lang.Object obj) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to wright.FODBDataFileException
- public void rewriteObjectt(java.lang.Object obj, long pos) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to writepos
- - position in the collection file.FODBDataFileException
- public void deleteObject(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to delete.FODBDataFileException
- public void writeHeader() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
- public void rewriteHeader() throws java.io.IOException, java.lang.ClassNotFoundException
public FODBCollectionFileHeader readHeader() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
- public java.lang.Class getObjectType()
public FODBIndexHeader[] getIndexsHeaders() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
- public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |