Package com.db4o.io
Class BlockAwareBinWindow
- java.lang.Object
-
- com.db4o.io.BlockAwareBinWindow
-
public class BlockAwareBinWindow extends java.lang.ObjectBounded handle into an IoAdapter: Can only access a restricted area.
-
-
Constructor Summary
Constructors Constructor Description BlockAwareBinWindow(BlockAwareBin io, int blockOff, int len)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable()Disable IO Adapter Windowvoidflush()Flush IO Adapter Windowintlength()intread(int off, byte[] data)voidwrite(int off, byte[] data)
-
-
-
Constructor Detail
-
BlockAwareBinWindow
public BlockAwareBinWindow(BlockAwareBin 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
-
-
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 startdata- Data to write into the window starting from the given offset- Throws:
java.lang.IllegalArgumentExceptionjava.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.IllegalArgumentExceptionjava.lang.IllegalStateException
-
disable
public void disable()
Disable IO Adapter Window
-
flush
public void flush()
Flush IO Adapter Window
-
-