|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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,
FODBCollectionDescriptor descriptor,
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. |
FODBCollectionDescriptor |
getDescriptor()
|
FODBIndexHeader[] |
getIndexsHeaders()
Read the indexs table. |
java.lang.Class |
getObjectType()
|
boolean |
isCompressed()
if isCompressed return true, all stored data object are zipped. |
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. |
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
FODBException
public boolean isCompressed()
public void setCollectionCypher(FODBCypher cypher) throws FODBException
cypher
- : cypher to be use to encrypt data.
FODBException
public static FODBCollectionFile createCollection(java.lang.String filePath, FODBCollectionDescriptor descriptor, FastObjectDB db) throws java.io.IOException, java.lang.ClassNotFoundException
filePath
- - same as constructor
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public static FODBCollectionFile openCollection(java.lang.String filePath, java.lang.String colname, FastObjectDB db) throws java.io.IOException, java.lang.ClassNotFoundException
filePath
- - same as constructor
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public long addIndex(long indexPos) throws java.io.IOException, java.lang.ClassNotFoundException
indexPos
- - position of the new index in the file.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object readNode(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to read.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public long writeNode(java.lang.Object obj) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to wright.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
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
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Object readObject(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to read.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public long writeObject(java.lang.Object obj) throws java.io.IOException, java.lang.ClassNotFoundException
obj
- - object to wright.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
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
java.io.IOException
java.lang.ClassNotFoundException
public void deleteObject(long pos) throws java.io.IOException, java.lang.ClassNotFoundException
pos
- - position of the object to delete.
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public void writeHeader() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public void rewriteHeader() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public FODBCollectionFileHeader readHeader() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.Class getObjectType()
public FODBIndexHeader[] getIndexsHeaders() throws java.io.IOException, java.lang.ClassNotFoundException
FODBDataFileException
java.io.IOException
java.lang.ClassNotFoundException
public FODBCollectionDescriptor getDescriptor()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |