Class NativeBuffer


  • public final class NativeBuffer
    extends java.lang.Object
    A native memory wrapper, whose underlying memory can be passed to another JNI method directly. Avoiding unnecessary JNI boxing and unboxing. Must be destroy manually MMKV.destroyNativeBuffer(com.tencent.mmkv.NativeBuffer).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long pointer  
      int size  
    • Constructor Summary

      Constructors 
      Constructor Description
      NativeBuffer​(long ptr, int length)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pointer

        public long pointer
      • size

        public int size
    • Constructor Detail

      • NativeBuffer

        public NativeBuffer​(long ptr,
                            int length)