| java.lang.Object com.db4o.io.IoAdapter
All known Subclasses: com.db4o.db4ounit.common.exceptions.ExceptionIOAdapter, com.db4o.util.io.win32.Win32IoAdapter, com.db4o.io.VanillaIoAdapter, com.db4o.io.CachedIoAdapter, com.db4o.util.io.NIOFileAdapter, com.db4o.io.MemoryIoAdapter, com.db4o.io.RandomAccessFileAdapter,
IoAdapter | abstract public class IoAdapter (Code) | | Base class for database file adapters, both for file and memory databases.
|
Method Summary | |
public void | blockCopy(int oldAddress, int oldAddressOffset, int newAddress, int newAddressOffset, int length) | public void | blockSeek(int address) | public void | blockSeek(int address, int offset) | public void | blockSize(int blockSize) | public int | blockSize() | abstract public void | close() | public void | copy(long oldAddress, long newAddress, int length) | public IoAdapter | delegatedIoAdapter() | abstract public void | delete(String path) | abstract public boolean | exists(String path) | abstract public long | getLength() | abstract public IoAdapter | open(String path, boolean lockFile, long initialLength, boolean readOnly) | public int | read(byte[] buffer) | abstract public int | read(byte[] bytes, int length) | final protected long | regularAddress(int blockAddress, int blockAddressOffset) | abstract public void | seek(long pos) | abstract public void | sync() | public void | write(byte[] bytes) | abstract public void | write(byte[] buffer, int length) |
blockCopy | public void blockCopy(int oldAddress, int oldAddressOffset, int newAddress, int newAddressOffset, int length) throws Db4oIOException(Code) | | copies a block within a file in block mode
|
blockSeek | public void blockSeek(int address) throws Db4oIOException(Code) | | sets the read/write pointer in the file using block mode
|
blockSeek | public void blockSeek(int address, int offset) throws Db4oIOException(Code) | | sets the read/write pointer in the file using block mode
|
blockSize | public void blockSize(int blockSize)(Code) | | outside call to set the block size of this adapter
|
blockSize | public int blockSize()(Code) | | returns the block size currently used
|
copy | public void copy(long oldAddress, long newAddress, int length) throws Db4oIOException(Code) | | copies a block within a file in absolute mode
|
delegatedIoAdapter | public IoAdapter delegatedIoAdapter()(Code) | | Delegated IO Adapter
reference to itself |
delete | abstract public void delete(String path)(Code) | | deletes the given path from whatever 'file system' is addressed
|
exists | abstract public boolean exists(String path)(Code) | | checks whether a file exists
|
getLength | abstract public long getLength() throws Db4oIOException(Code) | | implement to return the absolute length of the file
|
read | public int read(byte[] buffer) throws Db4oIOException(Code) | | reads a buffer at the seeked address
the number of bytes read and returned |
read | abstract public int read(byte[] bytes, int length) throws Db4oIOException(Code) | | implement to read a buffer at the seeked address
|
regularAddress | final protected long regularAddress(int blockAddress, int blockAddressOffset)(Code) | | converts address and address offset to an absolute address
|
seek | abstract public void seek(long pos) throws Db4oIOException(Code) | | implement to set the read/write pointer in the file, absolute mode
|
sync | abstract public void sync() throws Db4oIOException(Code) | | implement to flush the file contents to storage
|
write | abstract public void write(byte[] buffer, int length) throws Db4oIOException(Code) | | implement to write a buffer at the seeked address
|
|
|