Package com.db4o.internal
Class AbstractBufferContext
- java.lang.Object
-
- com.db4o.internal.AbstractBufferContext
-
- All Implemented Interfaces:
HandlerVersionContext,BufferContext,Context,ReadBuffer
- Direct Known Subclasses:
AbstractReadContext
public abstract class AbstractBufferContext extends java.lang.Object implements BufferContext, HandlerVersionContext
-
-
Constructor Summary
Constructors Constructor Description AbstractBufferContext(Transaction transaction, ReadBuffer buffer)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ReadBufferbuffer()ReadBufferbuffer(ReadBuffer buffer)ObjectContainerBasecontainer()abstract inthandlerVersion()booleanisLegacyHandlerVersion()ObjectContainerobjectContainer()intoffset()returns the current offset in the bufferBitMap4readBitMap(int bitCount)bytereadByte()reads a byte from the buffer.voidreadBytes(byte[] bytes)reads an array of bytes from the buffer.intreadInt()reads an int from the buffer.longreadLong()reads a long from the buffer.voidseek(int offset)positions the read pointer at the specified positionSlotFormatslotFormat()Transactiontransaction()
-
-
-
Constructor Detail
-
AbstractBufferContext
public AbstractBufferContext(Transaction transaction, ReadBuffer buffer)
-
-
Method Detail
-
buffer
public ReadBuffer buffer(ReadBuffer buffer)
-
buffer
public ReadBuffer buffer()
- Specified by:
bufferin interfaceBufferContext
-
readByte
public byte readByte()
Description copied from interface:ReadBufferreads a byte from the buffer.- Specified by:
readBytein interfaceReadBuffer- Returns:
- the byte
-
readBytes
public void readBytes(byte[] bytes)
Description copied from interface:ReadBufferreads 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.- Specified by:
readBytesin interfaceReadBuffer- Parameters:
bytes- the byte array to read the bytes into.
-
readInt
public int readInt()
Description copied from interface:ReadBufferreads an int from the buffer.- Specified by:
readIntin interfaceReadBuffer- Returns:
- the int
-
readLong
public long readLong()
Description copied from interface:ReadBufferreads a long from the buffer.- Specified by:
readLongin interfaceReadBuffer- Returns:
- the long
-
offset
public int offset()
Description copied from interface:ReadBufferreturns the current offset in the buffer- Specified by:
offsetin interfaceReadBuffer- Returns:
- the offset
-
seek
public void seek(int offset)
Description copied from interface:ReadBufferpositions the read pointer at the specified position- Specified by:
seekin interfaceReadBuffer- Parameters:
offset- the desired position in the buffer
-
container
public ObjectContainerBase container()
-
objectContainer
public ObjectContainer objectContainer()
- Specified by:
objectContainerin interfaceContext
-
transaction
public Transaction transaction()
- Specified by:
transactionin interfaceContext
-
handlerVersion
public abstract int handlerVersion()
- Specified by:
handlerVersionin interfaceHandlerVersionContext
-
isLegacyHandlerVersion
public boolean isLegacyHandlerVersion()
-
readBitMap
public BitMap4 readBitMap(int bitCount)
- Specified by:
readBitMapin interfaceReadBuffer
-
slotFormat
public SlotFormat slotFormat()
- Specified by:
slotFormatin interfaceHandlerVersionContext
-
-