db4o 6.1

com.db4o.io
Class IoAdapterWindow

java.lang.Object
  extended by com.db4o.io.IoAdapterWindow

public class IoAdapterWindow
extends java.lang.Object

Bounded handle into an IoAdapter: Can only access a restricted area.


Constructor Summary
IoAdapterWindow(IoAdapter io, int blockOff, int len)
           
 
Method Summary
 void disable()
           
 void flush()
           
 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
 

Constructor Detail

IoAdapterWindow

public IoAdapterWindow(IoAdapter io,
                       int blockOff,
                       int len)
Parameters:
io - The delegate I/O adapter
blockOff - The block offset address into the I/O adapter that maps to the start index (0) of this window
len - The size of this window in bytes
Method Detail

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,
                  java.io.IOException
Parameters:
off - Offset in bytes relative to the window start
data - Data to write into the window starting from the given offset
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.io.IOException

read

public int read(int off,
                byte[] data)
         throws java.lang.IllegalArgumentException,
                java.lang.IllegalStateException,
                java.io.IOException
Parameters:
off - Offset in bytes relative to the window start
data - Data buffer to read from the window starting from the given offset
Throws:
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.io.IOException

disable

public void disable()

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

db4o 6.1