|
db4o 7.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.db4o.io.IoAdapter
com.db4o.io.RandomAccessFileAdapter
com.db4o.io.SymbianIoAdapter
public class SymbianIoAdapter
Workaround for two I/O bugs in Symbian JDK versions:
- seek() cannot move beyond the current file length.
Fix: Write padding bytes up to the seek target if necessary
- Under certain (rare) conditions, calls to RAF.length() seems
to garble up following reads.
Fix: Use a second RAF handle to the file for length() calls
only.
Usage:
Db4o.configure().io(new com.db4o.io.SymbianIoAdapter())
TODO:
- BasicClusterTest C/S fails (in AllTests context only)
Constructor Summary | |
---|---|
SymbianIoAdapter()
|
Method Summary | |
---|---|
long |
getLength()
implement to return the absolute length of the file |
IoAdapter |
open(java.lang.String path,
boolean lockFile,
long initialLength,
boolean readOnly)
implement to open the file |
int |
read(byte[] bytes,
int length)
implement to read a buffer at the seeked address |
void |
seek(long pos)
implement to set the read/write pointer in the file, absolute mode |
void |
write(byte[] buffer,
int length)
implement to write a buffer at the seeked address |
Methods inherited from class com.db4o.io.RandomAccessFileAdapter |
---|
close, delete, exists, sync |
Methods inherited from class com.db4o.io.IoAdapter |
---|
blockCopy, blockSeek, blockSeek, blockSize, blockSize, copy, delegatedIoAdapter, read, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SymbianIoAdapter()
Method Detail |
---|
public IoAdapter open(java.lang.String path, boolean lockFile, long initialLength, boolean readOnly) throws Db4oIOException
IoAdapter
open
in class RandomAccessFileAdapter
Db4oIOException
public long getLength() throws Db4oIOException
IoAdapter
getLength
in class RandomAccessFileAdapter
Db4oIOException
public int read(byte[] bytes, int length) throws Db4oIOException
IoAdapter
read
in class RandomAccessFileAdapter
Db4oIOException
public void write(byte[] buffer, int length) throws Db4oIOException
IoAdapter
write
in class RandomAccessFileAdapter
Db4oIOException
public void seek(long pos) throws Db4oIOException
IoAdapter
seek
in class RandomAccessFileAdapter
Db4oIOException
|
db4o 7.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |