Package io.objectbox.flatbuffers
Class ByteBufferUtil
- java.lang.Object
-
- io.objectbox.flatbuffers.ByteBufferUtil
-
public class ByteBufferUtil extends java.lang.ObjectClass that collects utility functions around `ByteBuffer`.
-
-
Constructor Summary
Constructors Constructor Description ByteBufferUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetSizePrefix(java.nio.ByteBuffer bb)Extract the size prefix from a `ByteBuffer`.static java.nio.ByteBufferremoveSizePrefix(java.nio.ByteBuffer bb)Create a duplicate of a size-prefixed `ByteBuffer` that has its position advanced just past the size prefix.
-
-
-
Method Detail
-
getSizePrefix
public static int getSizePrefix(java.nio.ByteBuffer bb)
Extract the size prefix from a `ByteBuffer`.- Parameters:
bb- a size-prefixed buffer- Returns:
- the size prefix
-
removeSizePrefix
public static java.nio.ByteBuffer removeSizePrefix(java.nio.ByteBuffer bb)
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
-
-