Package com.db4o.internal
Class MarshallingBuffer
- java.lang.Object
-
- com.db4o.internal.MarshallingBuffer
-
- All Implemented Interfaces:
WriteBuffer
public class MarshallingBuffer extends java.lang.Object implements WriteBuffer
-
-
Constructor Summary
Constructors Constructor Description MarshallingBuffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarshallingBuffer
addChild()
MarshallingBuffer
addChild(boolean reserveLinkSpace, boolean storeLengthInLink)
MarshallingBuffer
checkBlockAlignment(MarshallingContext context, MarshallingBuffer precedingBuffer, IntByRef precedingLength)
void
debugDecrementLastOffset(int count)
boolean
hasParent()
int
length()
int
marshalledLength()
void
mergeChildren(MarshallingContext context, int masterAddress, int linkOffset)
int
offset()
void
prepareWrite(int sizeNeeded)
void
requestIndexEntry(FieldMetadata fieldMetadata)
ReservedBuffer
reserve(int length)
void
reserveChildLinkSpace(boolean storeLengthInLink)
void
seek(int offset)
ByteArrayBuffer
testDelegate()
void
transferContentTo(ByteArrayBuffer buffer)
void
transferContentTo(ByteArrayBuffer buffer, int length)
void
transferLastWriteTo(MarshallingBuffer other, boolean storeLengthInLink)
void
writeByte(byte b)
writes a single byte to the buffer.void
writeBytes(byte[] bytes)
writes an array of bytes to the buffervoid
writeInt(int i)
writes an int to the buffer.void
writeLong(long l)
writes a long to the buffer
-
-
-
Method Detail
-
length
public int length()
-
offset
public int offset()
-
writeByte
public void writeByte(byte b)
Description copied from interface:WriteBuffer
writes a single byte to the buffer.- Specified by:
writeByte
in interfaceWriteBuffer
- Parameters:
b
- the byte
-
writeBytes
public void writeBytes(byte[] bytes)
Description copied from interface:WriteBuffer
writes an array of bytes to the buffer- Specified by:
writeBytes
in interfaceWriteBuffer
- Parameters:
bytes
- the byte array
-
writeInt
public void writeInt(int i)
Description copied from interface:WriteBuffer
writes an int to the buffer.- Specified by:
writeInt
in interfaceWriteBuffer
- Parameters:
i
- the int
-
writeLong
public void writeLong(long l)
Description copied from interface:WriteBuffer
writes a long to the buffer- Specified by:
writeLong
in interfaceWriteBuffer
- Parameters:
l
- the long
-
prepareWrite
public void prepareWrite(int sizeNeeded)
-
transferLastWriteTo
public void transferLastWriteTo(MarshallingBuffer other, boolean storeLengthInLink)
-
transferContentTo
public void transferContentTo(ByteArrayBuffer buffer)
-
transferContentTo
public void transferContentTo(ByteArrayBuffer buffer, int length)
-
testDelegate
public ByteArrayBuffer testDelegate()
-
addChild
public MarshallingBuffer addChild()
-
addChild
public MarshallingBuffer addChild(boolean reserveLinkSpace, boolean storeLengthInLink)
-
reserveChildLinkSpace
public void reserveChildLinkSpace(boolean storeLengthInLink)
-
mergeChildren
public void mergeChildren(MarshallingContext context, int masterAddress, int linkOffset)
-
seek
public void seek(int offset)
-
reserve
public ReservedBuffer reserve(int length)
-
debugDecrementLastOffset
public void debugDecrementLastOffset(int count)
-
hasParent
public boolean hasParent()
-
requestIndexEntry
public void requestIndexEntry(FieldMetadata fieldMetadata)
-
checkBlockAlignment
public MarshallingBuffer checkBlockAlignment(MarshallingContext context, MarshallingBuffer precedingBuffer, IntByRef precedingLength)
-
marshalledLength
public int marshalledLength()
-
-