Package io.objectbox.flatbuffers
Class ByteBufferUtil
java.lang.Object
io.objectbox.flatbuffers.ByteBufferUtil
Class that collects utility functions around `ByteBuffer`.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intExtract the size prefix from a `ByteBuffer`.static ByteBufferCreate a duplicate of a size-prefixed `ByteBuffer` that has its position advanced just past the size prefix.
-
Constructor Details
-
ByteBufferUtil
public ByteBufferUtil()
-
-
Method Details
-
getSizePrefix
Extract the size prefix from a `ByteBuffer`.- Parameters:
bb- a size-prefixed buffer- Returns:
- the size prefix
-
removeSizePrefix
Create a duplicate of a size-prefixed `ByteBuffer` that has its position advanced just past the size prefix.- Parameters:
bb- a size-prefixed buffer- Returns:
- a new buffer on the same underlying data that has skipped the size prefix
-