db4o 7.4

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()
          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
 

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
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

read

public int read(int off,
                byte[] data)
         throws java.lang.IllegalArgumentException,
                java.lang.IllegalStateException
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

disable

public void disable()
Disable IO Adapter Window


flush

public void flush()
Flush IO Adapter Window


db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.