com.db4o.io
Class IoAdapterWindow
java.lang.Object
com.db4o.io.IoAdapterWindow
public class IoAdapterWindow
- extends java.lang.Object
Bounded handle into an IoAdapter: Can only access a restricted area.
Method Summary |
void |
disable()
Disable IO Adapter Window |
void |
flush()
Flush IO Adapter Window |
int |
length()
|
int |
read(int off,
byte[] data)
|
void |
write(int off,
byte[] data)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IoAdapterWindow
public IoAdapterWindow(IoAdapter io,
int blockOff,
int len)
- Parameters:
io
- The delegate I/O adapterblockOff
- The block offset address into the I/O adapter that maps to the start index (0) of this windowlen
- The size of this window in bytes
length
public int length()
- Returns:
- Size of this I/O adapter window in bytes.
write
public void write(int off,
byte[] data)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
- Parameters:
off
- Offset in bytes relative to the window startdata
- Data to write into the window starting from the given offset
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
read
public int read(int off,
byte[] data)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
- Parameters:
off
- Offset in bytes relative to the window startdata
- Data buffer to read from the window starting from the given offset
- Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
disable
public void disable()
- Disable IO Adapter Window
flush
public void flush()
- Flush IO Adapter Window
Copyright 2007 db4objects Inc. All rights reserved.