Class FileUtilJNA
java.lang.Object
oshi.jna.util.FileUtilJNA
JNA-specific extensions to
FileUtil for reading native types from buffers and freeing native memory.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidIf the given Pointer is of class Memory, executes the close method on it to free its native allocationstatic NativeLongReads a NativeLong value from a ByteBufferstatic PointerReads a Pointer value from a ByteBufferstatic LibCAPI.size_tReads a size_t value from a ByteBuffer
-
Method Details
-
readNativeLongFromBuffer
Reads a NativeLong value from a ByteBuffer- Parameters:
buff- The bytebuffer to read from- Returns:
- The next value
-
readSizeTFromBuffer
Reads a size_t value from a ByteBuffer- Parameters:
buff- The bytebuffer to read from- Returns:
- The next value
-
readPointerFromBuffer
Reads a Pointer value from a ByteBuffer- Parameters:
buff- The bytebuffer to read from- Returns:
- The next value
-
freeMemory
If the given Pointer is of class Memory, executes the close method on it to free its native allocation- Parameters:
p- A pointer
-