| IJVMWrapperDirectNewDirectBuffer(IntPtr, Int64, EventHandlerObject, Object, Int32) Method |
Namespace: MASES.JCOBridge.C2JBridge.JVMInteropAssembly: C2JBridge (in C2JBridge.dll) Version: 2.5.21.241219-a6a144ea07c497c3a9a1be842408e852afb458be
Syntax JCOBridgeDirectBuffer<byte> NewDirectBuffer(
IntPtr rawAddr,
long capacity,
EventHandler<Object> disposeEvent = null,
Object disposeEventState = null,
int timeToLive = -1
)
Function NewDirectBuffer (
rawAddr As IntPtr,
capacity As Long,
Optional disposeEvent As EventHandler(Of Object) = Nothing,
Optional disposeEventState As Object = Nothing,
Optional timeToLive As Integer = -1
) As JCOBridgeDirectBuffer(Of Byte)
Parameters
- rawAddr IntPtr
- The pointer where data is stored
- capacity Int64
- Declares the memory available, in Byte, associated to rawAddr
- disposeEvent EventHandlerObject (Optional)
- An optional EventHandlerTEventArgs can be used to be informed when the rawAddr can be safely retired becuase the JVM is no moore using the pointer of rawAddr.
- disposeEventState Object (Optional)
- The data will be associated to disposeEvent, by default the value will be rawAddr
- timeToLive Int32 (Optional)
- The time to live, expressed in milliseconds, the underlying memory shall remain available;
if the time to live expires the memory is retired leaving potentially the JVM under the possibility of an access violation.
Return Value
JCOBridgeDirectBufferByteA new instance of
JCOBridgeDirectBufferT holding the memory of
rawAddr shared with the
https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.htmlRemarks See Also