 | IJVMWrapperDirectNewDirectBuffer(IntPtr, Int64, EventHandlerObject, Object, Int32) Method |
Namespace: MASES.JCOBridge.C2JBridge.JVMInteropAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
SyntaxJCOBridgeDirectBuffer<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 ActionT can be used to be informed when the rawAddr can be safely retired because the JVM is no longer 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.html
Exceptions
Remarks
See Also