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 MarshallingBufferaddChild()MarshallingBufferaddChild(boolean reserveLinkSpace, boolean storeLengthInLink)MarshallingBuffercheckBlockAlignment(MarshallingContext context, MarshallingBuffer precedingBuffer, IntByRef precedingLength)voiddebugDecrementLastOffset(int count)booleanhasParent()intlength()intmarshalledLength()voidmergeChildren(MarshallingContext context, int masterAddress, int linkOffset)intoffset()voidprepareWrite(int sizeNeeded)voidrequestIndexEntry(FieldMetadata fieldMetadata)ReservedBufferreserve(int length)voidreserveChildLinkSpace(boolean storeLengthInLink)voidseek(int offset)ByteArrayBuffertestDelegate()voidtransferContentTo(ByteArrayBuffer buffer)voidtransferContentTo(ByteArrayBuffer buffer, int length)voidtransferLastWriteTo(MarshallingBuffer other, boolean storeLengthInLink)voidwriteByte(byte b)writes a single byte to the buffer.voidwriteBytes(byte[] bytes)writes an array of bytes to the buffervoidwriteInt(int i)writes an int to the buffer.voidwriteLong(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:WriteBufferwrites a single byte to the buffer.- Specified by:
writeBytein interfaceWriteBuffer- Parameters:
b- the byte
-
writeBytes
public void writeBytes(byte[] bytes)
Description copied from interface:WriteBufferwrites an array of bytes to the buffer- Specified by:
writeBytesin interfaceWriteBuffer- Parameters:
bytes- the byte array
-
writeInt
public void writeInt(int i)
Description copied from interface:WriteBufferwrites an int to the buffer.- Specified by:
writeIntin interfaceWriteBuffer- Parameters:
i- the int
-
writeLong
public void writeLong(long l)
Description copied from interface:WriteBufferwrites a long to the buffer- Specified by:
writeLongin 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()
-
-