public final class DefragmentContextImpl extends java.lang.Object implements ReadWriteBuffer, DefragmentContext
| Constructor and Description |
|---|
DefragmentContextImpl(ByteArrayBuffer source,
DefragmentContextImpl context) |
DefragmentContextImpl(ByteArrayBuffer source,
DefragmentServices services) |
DefragmentContextImpl(ByteArrayBuffer source,
DefragmentServices services,
ObjectHeader header) |
DefragmentContextImpl(DefragmentContextImpl parentContext,
ObjectHeader header) |
| Modifier and Type | Method and Description |
|---|---|
Slot |
allocateMappedTargetSlot(int sourceAddress,
int length)
only used by old handlers: OpenTypeHandler0, StringHandler0, ArrayHandler0.
|
Slot |
allocateTargetSlot(int length)
only used by old handlers: OpenTypeHandler0, StringHandler0, ArrayHandler0.
|
void |
beginSlot() |
ReadBuffer |
buffer() |
ClassMetadata |
classMetadata() |
int |
consumeCurrentParentSourceID() |
ObjectContainerBase |
container() |
void |
copyAddress() |
int |
copyID() |
int |
copyID(boolean flipNegative) |
int |
copyIDReturnOriginalID() |
int |
copyIDReturnOriginalID(boolean flipNegative) |
int |
copySlotlessID() |
int |
copySlotToNewMapped(int sourceAddress,
int length) |
int |
copyUnindexedID() |
void |
currentParentSourceID(int id) |
int |
declaredAspectCount() |
void |
declaredAspectCount(int count) |
void |
defragment(TypeHandler4 handler) |
int |
handlerVersion() |
void |
incrementIntSize() |
void |
incrementOffset(int numBytes) |
void |
incrementStringOffset(LatinStringIO sio) |
boolean |
isLegacyHandlerVersion() |
boolean |
isNull(int fieldIndex) |
int |
length() |
int |
mappedID(int origID) |
IDMapping |
mapping() |
ObjectContainer |
objectContainer() |
int |
offset()
returns the current offset in the buffer
|
static void |
processCopy(DefragmentServices context,
int sourceID,
SlotCopyHandler command) |
static void |
processCopy(DefragmentServices services,
int sourceID,
SlotCopyHandler command,
ByteArrayBuffer sourceReader) |
void |
readBegin(byte identifier) |
BitMap4 |
readBitMap(int bitCount) |
byte |
readByte()
reads a byte from the buffer.
|
void |
readBytes(byte[] bytes)
reads an array of bytes from the buffer.
|
void |
readEnd() |
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
|
DefragmentServices |
services() |
SlotFormat |
slotFormat() |
ByteArrayBuffer |
sourceBuffer() |
ByteArrayBuffer |
sourceBufferByAddress(int sourceAddress,
int length) |
ByteArrayBuffer |
sourceBufferById(int sourceId) |
Transaction |
systemTrans() |
ByteArrayBuffer |
targetBuffer() |
void |
targetWriteBytes(int address,
ByteArrayBuffer buffer) |
Transaction |
transaction() |
TypeHandler4 |
typeHandlerForId(int id) |
void |
write(LocalObjectContainer file,
int address) |
void |
writeByte(byte value)
writes a single byte to the buffer.
|
void |
writeBytes(byte[] bytes)
writes an array of bytes to the buffer
|
void |
writeInt(int value)
writes an int to the buffer.
|
void |
writeLong(long value)
writes a long to the buffer
|
int |
writeMappedID(int originalID) |
void |
writeToTarget(int address) |
public DefragmentContextImpl(ByteArrayBuffer source, DefragmentContextImpl context)
public DefragmentContextImpl(ByteArrayBuffer source, DefragmentServices services)
public DefragmentContextImpl(ByteArrayBuffer source, DefragmentServices services, ObjectHeader header)
public DefragmentContextImpl(DefragmentContextImpl parentContext, ObjectHeader header)
public int offset()
ReadBufferoffset in interface ReadBufferpublic void seek(int offset)
ReadBufferseek in interface ReadBufferoffset - the desired position in the bufferpublic void incrementOffset(int numBytes)
incrementOffset in interface DefragmentContextincrementOffset in interface ReadWriteBufferpublic void incrementIntSize()
incrementIntSize in interface ReadWriteBufferpublic int copySlotlessID()
copySlotlessID in interface DefragmentContextpublic int copyUnindexedID()
copyUnindexedID in interface DefragmentContextpublic int copyID()
copyID in interface DefragmentContextpublic int copyID(boolean flipNegative)
public int copyIDReturnOriginalID()
copyIDReturnOriginalID in interface DefragmentContextpublic int copyIDReturnOriginalID(boolean flipNegative)
public void readBegin(byte identifier)
readBegin in interface ReadWriteBufferpublic byte readByte()
ReadBufferreadByte in interface ReadBufferpublic void readBytes(byte[] bytes)
ReadBufferreadBytes in interface ReadBufferbytes - the byte array to read the bytes into.public int readInt()
ReadBufferreadInt in interface ReadBufferpublic void writeInt(int value)
WriteBufferwriteInt in interface WriteBuffervalue - the intpublic void write(LocalObjectContainer file, int address)
public void incrementStringOffset(LatinStringIO sio)
public ByteArrayBuffer sourceBuffer()
sourceBuffer in interface DefragmentContextpublic ByteArrayBuffer targetBuffer()
targetBuffer in interface DefragmentContextpublic IDMapping mapping()
public Transaction systemTrans()
public DefragmentServices services()
services in interface DefragmentContextpublic static void processCopy(DefragmentServices context, int sourceID, SlotCopyHandler command)
public static void processCopy(DefragmentServices services, int sourceID, SlotCopyHandler command, ByteArrayBuffer sourceReader)
public void writeByte(byte value)
WriteBufferwriteByte in interface WriteBuffervalue - the bytepublic long readLong()
ReadBufferreadLong in interface ReadBufferpublic void writeLong(long value)
WriteBufferwriteLong in interface WriteBuffervalue - the longpublic BitMap4 readBitMap(int bitCount)
readBitMap in interface ReadBufferpublic void readEnd()
readEnd in interface ReadWriteBufferpublic int writeMappedID(int originalID)
public int length()
length in interface ReadWriteBufferpublic Transaction transaction()
transaction in interface Contextpublic ObjectContainerBase container()
container in interface DefragmentContextpublic TypeHandler4 typeHandlerForId(int id)
typeHandlerForId in interface DefragmentContextpublic int handlerVersion()
handlerVersion in interface DefragmentContexthandlerVersion in interface HandlerVersionContextpublic boolean isLegacyHandlerVersion()
isLegacyHandlerVersion in interface DefragmentContextpublic int mappedID(int origID)
mappedID in interface DefragmentContextpublic ObjectContainer objectContainer()
objectContainer in interface Contextpublic Slot allocateTargetSlot(int length)
allocateTargetSlot in interface DefragmentContextpublic Slot allocateMappedTargetSlot(int sourceAddress, int length)
allocateMappedTargetSlot in interface DefragmentContextpublic int copySlotToNewMapped(int sourceAddress,
int length)
throws java.io.IOException
copySlotToNewMapped in interface DefragmentContextjava.io.IOExceptionpublic void targetWriteBytes(int address,
ByteArrayBuffer buffer)
targetWriteBytes in interface DefragmentContextpublic ByteArrayBuffer sourceBufferByAddress(int sourceAddress, int length) throws java.io.IOException
sourceBufferByAddress in interface DefragmentContextjava.io.IOExceptionpublic ByteArrayBuffer sourceBufferById(int sourceId) throws java.io.IOException
sourceBufferById in interface DefragmentContextjava.io.IOExceptionpublic void writeToTarget(int address)
public void writeBytes(byte[] bytes)
WriteBufferwriteBytes in interface WriteBufferbytes - the byte arraypublic ReadBuffer buffer()
buffer in interface MarshallingInfobuffer in interface BufferContextpublic void defragment(TypeHandler4 handler)
defragment in interface DefragmentContextpublic void beginSlot()
beginSlot in interface MarshallingInfopublic ClassMetadata classMetadata()
classMetadata in interface MarshallingInfopublic boolean isNull(int fieldIndex)
isNull in interface MarshallingInfopublic int declaredAspectCount()
declaredAspectCount in interface AspectVersionContextpublic void declaredAspectCount(int count)
declaredAspectCount in interface AspectVersionContextpublic SlotFormat slotFormat()
slotFormat in interface HandlerVersionContextpublic void currentParentSourceID(int id)
public int consumeCurrentParentSourceID()
public void copyAddress()