Class NativeBuffer
java.lang.Object
org.maplibre.nativejni.render.NativeBuffer
- All Implemented Interfaces:
AutoCloseable
Explicit off-heap byte buffer for reusable native readback and upload storage.
The JNI implementation stores bytes in a direct ByteBuffer, so capacity is limited to
Integer.MAX_VALUE bytes. Closing the buffer invalidates this wrapper immediately; the JVM
releases the direct-buffer memory according to its own buffer and garbage-collection lifecycle.
-
Method Summary
Modifier and TypeMethodDescriptionstatic NativeBufferallocate(long byteLength) longvoidclose()byte[]
-
Method Details
-
allocate
-
byteLength
public long byteLength() -
toByteArray
public byte[] toByteArray() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-