Class SignificantBytesBE
java.lang.Object
org.eclipse.rdf4j.sail.lmdb.util.SignificantBytesBE
Fast reader for 1..8 "significant" big-endian bytes from a ByteBuffer. Chooses optimal path at runtime: - heap-backed
buffers: raw array indexing (no per-byte virtual calls), - direct/read-only buffers: absolute wide reads +
conditional byte-swap.
Returns an unsigned value in the low bits of the long (0 .. 2^(8*n)-1).
-
Method Summary
Modifier and TypeMethodDescriptionstatic longread(ByteBuffer bb, int n) Read n (1..8) big-endian significant bytes from the buffer and advance position by n.static longreadDirect(ByteBuffer bb, int n)
-
Method Details
-
read
Read n (1..8) big-endian significant bytes from the buffer and advance position by n.- Throws:
IllegalArgumentException- if n is not in [1,8]BufferUnderflowException- if fewer than n bytes remain
-
readDirect
-