| Package | Description |
|---|---|
| eu.aschuetz.nativeutils.api |
| Modifier and Type | Method and Description |
|---|---|
NativeMemory |
JVMNativeUtil.GetDirectBufferAddress(ByteBuffer buffer,
int off,
int size)
Returns a NativeMemory object that uses the direct byte buffer object as backing.
|
NativeMemory |
LinuxNativeUtil.malloc(long size)
Allocates a new pointer of the given size
|
NativeMemory |
WindowsNativeUtil.malloc(long size)
Allocates a new pointer of the given size
|
NativeMemory |
NativeBuffer.memory()
Returns the memory that this NativeBuffer backs or null if it is not backed by NativeMemory.
|
NativeMemory |
LinuxNativeUtil.pointer(long ptr,
long size,
PointerHandler handler)
Any calls to the resulting NativeMemory may cause the JVM to die due to a SEGFAULT is size is not specified correctly.
|
NativeMemory |
WindowsNativeUtil.pointer(long ptr,
long size,
PointerHandler handler)
Any calls to the resulting NativeMemory may cause the JVM to die due to a SEGFAULT is size is not specified correctly.
|
| Modifier and Type | Method and Description |
|---|---|
int |
WindowsNativeUtil.DeviceIoControl(long hDevice,
int dwIoControlCode,
NativeMemory inBuffer,
long inOff,
int inLen,
NativeMemory outBuffer,
long outOff,
int outLen)
Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
|
int |
LinuxNativeUtil.fcntl(int fd,
int code,
NativeMemory param,
long off) |
int |
LinuxNativeUtil.ioctl(int fd,
int code,
NativeMemory mem,
long off)
trigger an ioctl with a device.
|
int |
LinuxNativeUtil.read(int fd,
NativeMemory mem,
long off,
int len)
Reads from a file descriptor.
|
void |
NativeMemory.read(long off,
NativeMemory dst,
long dstOff,
long len)
reads len bytes from offset address and stores them into dst.
|
int |
WindowsNativeUtil.ReadFile(long handle,
NativeMemory buffer,
long off,
int len)
Reads bytes from a handle into a buffer.
|
long |
WindowsNativeUtil.ReadFile(long handle,
NativeMemory buffer,
long off,
int len,
long overlapped,
long event)
reads using overlapped mechanism. returns an overlapped pointer that must be feed by calling
WindowsNativeUtil.free(long) after it has been confirmed that the async READ is done by calling GetOverlappedResult. |
int |
LinuxNativeUtil.write(int fd,
NativeMemory mem,
long off,
int len)
Write to a file descriptor
returns the number of bytes written from the buffer.
|
int |
WindowsNativeUtil.WriteFile(long handle,
NativeMemory buffer,
long off,
int len)
Writes bytes from a Buffer into a handle.
|
long |
WindowsNativeUtil.WriteFile(long handle,
NativeMemory buffer,
long off,
int len,
long overlapped,
long event)
writes using overlapped mechanism. returns an overlapped pointer that must be feed by calling
WindowsNativeUtil.free(long) after it has been confirmed that the async WRITE is done by calling GetOverlappedResult. |
Copyright © 2023. All rights reserved.