db4o 7.4

com.db4o.marshall
Interface ReadBuffer

All Known Subinterfaces:
ReadContext

public interface ReadBuffer

a buffer interface with methods to read and to position the read pointer in the buffer.


Method Summary
 int offset()
          returns the current offset in the buffer
 com.db4o.foundation.BitMap4 readBitMap(int bitCount)
           
 byte readByte()
          reads a byte from the buffer.
 void readBytes(byte[] bytes)
          reads an array of bytes from the buffer.
 int readInt()
          reads an int from the buffer.
 long readLong()
          reads a long from the buffer.
 void seek(int offset)
          positions the read pointer at the specified position
 void seekCurrentInt()
          reads and int from the current offset position and seeks the
 

Method Detail

offset

int offset()
returns the current offset in the buffer

Returns:
the offset

readBitMap

com.db4o.foundation.BitMap4 readBitMap(int bitCount)

readByte

byte readByte()
reads a byte from the buffer.

Returns:
the byte

readBytes

void readBytes(byte[] bytes)
reads an array of bytes from the buffer. The length of the array that is passed as a parameter specifies the number of bytes that are to be read. The passed bytes buffer parameter is directly filled.

Parameters:
bytes - the byte array to read the bytes into.

readInt

int readInt()
reads an int from the buffer.

Returns:
the int

readLong

long readLong()
reads a long from the buffer.

Returns:
the long

seek

void seek(int offset)
positions the read pointer at the specified position

Parameters:
offset - the desired position in the buffer

seekCurrentInt

void seekCurrentInt()
reads and int from the current offset position and seeks the


db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.