JniEnvironment.IO.NewDirectByteBuffer(IntPtr, Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Wraps existing native memory in a direct Java byte buffer without taking ownership of the memory.
public static Java.Interop.JniObjectReference NewDirectByteBuffer(IntPtr address, long capacity);
static member NewDirectByteBuffer : nativeint * int64 -> Java.Interop.JniObjectReference
Parameters
- address
-
IntPtr
nativeint
The native memory address. Its owner must keep the memory valid for the Java buffer's entire use.
- capacity
- Int64
The memory size in bytes, from zero through Int32.MaxValue.
Returns
The local buffer reference returned by JNI; native exceptions are converted to managed exceptions.
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.