Class CoreCompactCursor
java.lang.Object
thc.CoreCompactCursor
Bounded, segment-relative reads. The owner retains a mapping/member lease
while the cursor is in use; decoding takes no per-byte cache lock.
-
Constructor Summary
ConstructorsConstructorDescriptionCoreCompactCursor(MemorySegment bytes) CoreCompactCursor(MemorySegment bytes, long start) CoreCompactCursor(MemorySegment bytes, long start, long end) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes(int length) intcount()intcount(int minimumElementBytes) Check encoded extent before allocating a count-sized JVM carrier.voidlonglonglonglongoffset()booleanintreadByte()longsigned()static MemorySegmentslice(MemorySegment bytes, long start, long length) text(int length) intu16()longu32()longunsigned()longAll 64 unsigned bits, without narrowing, in a JVM long.static Stringutf8(MemorySegment bytes, long start, long length) Decode only this span; cold strings remain mapped bytes.
-
Constructor Details
-
CoreCompactCursor
-
CoreCompactCursor
-
CoreCompactCursor
-
-
Method Details
-
getPosition
-
getRemaining
-
readByte
-
readBoolean
-
unsignedBits
All 64 unsigned bits, without narrowing, in a JVM long. -
unsigned
-
signed
-
count
-
count
Check encoded extent before allocating a count-sized JVM carrier. -
u16
-
u32
-
fixedBits
-
offset
-
bytes
-
text
- Throws:
CharacterCodingException
-
expectEnd
-
slice
-
utf8
public static String utf8(MemorySegment bytes, long start, long length) throws CharacterCodingException Decode only this span; cold strings remain mapped bytes.- Throws:
CharacterCodingException
-