|
db4o 6.1 | ||||||||
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)
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) throws java.io.IOException
IoAdapter
open
in class RandomAccessFileAdapter
java.io.IOException
public long getLength() throws java.io.IOException
IoAdapter
getLength
in class RandomAccessFileAdapter
java.io.IOException
public int read(byte[] bytes, int length) throws java.io.IOException
IoAdapter
read
in class RandomAccessFileAdapter
java.io.IOException
public void write(byte[] buffer, int length) throws java.io.IOException
IoAdapter
write
in class RandomAccessFileAdapter
java.io.IOException
public void seek(long pos) throws java.io.IOException
IoAdapter
seek
in class RandomAccessFileAdapter
java.io.IOException
|
db4o 6.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |