| Package | Description |
|---|---|
| eu.aschuetz.nativeutils.api | |
| eu.aschuetz.nativeutils.api.exceptions |
| Modifier and Type | Method and Description |
|---|---|
boolean |
WindowsNativeUtil._locking(int fd,
WindowsNativeUtil._locking_Mode mode,
long len)
returns true if successful false if not.
|
Stat |
WindowsNativeUtil._stat64(String path) |
void |
LinuxNativeUtil.bind(int fd,
Sockaddr sockaddr)
Binds a socket to a address.
|
void |
WindowsNativeUtil.CancelIo(long handle) |
void |
WindowsNativeUtil.CancelIoEx(long handle,
long overlapped) |
void |
WindowsNativeUtil.CancelSynchronousIo(long threadHandle) |
void |
LinuxNativeUtil.chdir(String path)
Changes the work directory of the entire jvm process.
|
void |
WindowsNativeUtil.ClearCommBreak(long handle) |
int |
WindowsNativeUtil.ClearCommError(long handle) |
int |
WindowsNativeUtil.ClearCommError(long handle,
ComStat stat) |
void |
WindowsNativeUtil.CloseHandle(long handle)
Closes a windows handle.
|
void |
WindowsNativeUtil.ConnectNamedPipe(long pipeHandle) |
long |
WindowsNativeUtil.ConnectNamedPipe(long pipeHandle,
long eventHandle) |
long |
WindowsNativeUtil.ConvertInterfaceIndexToLuid(int idx) |
String |
WindowsNativeUtil.ConvertInterfaceLuidToAlias(long luid) |
int |
WindowsNativeUtil.ConvertInterfaceLuidToIndex(long luid) |
String |
WindowsNativeUtil.ConvertInterfaceLuidToNameA(long luid) |
long |
WindowsNativeUtil.ConvertInterfaceNameToLuidA(String name) |
long |
WindowsNativeUtil.CreateEventA(long lpEventAttributes,
boolean manualReset,
boolean initialState,
String name)
Returns a newly created event handle from the OS.
|
long |
WindowsNativeUtil.CreateFileA(String lpFileName,
int access,
boolean allowDelete,
boolean allowRead,
boolean allowWrite,
WindowsNativeUtil.CreateFileA_createMode openMode,
int attributes)
opens a windows handle for a given path.
|
long |
WindowsNativeUtil.CreateFileMappingA(long hFile,
long lpFileMappingAttributes,
int flProtect,
int dwMaximumSizeHigh,
int dwMaximumSizeLow,
String lpName)
Creates a file mapping.
|
long |
WindowsNativeUtil.CreateFileW(String lpFileName,
int access,
boolean allowDelete,
boolean allowRead,
boolean allowWrite,
WindowsNativeUtil.CreateFileA_createMode openMode,
int attributes)
opens a windows handle for a given path.
|
void |
WindowsNativeUtil.CreateHardLinkA(String lpFileName,
String lpExistingFileName)
Makes a hard link.
|
boolean |
WindowsNativeUtil.CreateIpForwardEntry2(MibIpForwardRow2 entry) |
long |
WindowsNativeUtil.CreateNamedPipeA(String name,
int dwOpenMode,
int dwPipeMode,
int nMaxInstances,
int nOutBufferSize,
int nInBufferSize,
int nDefaultTimeOut,
long lpSecurityAttributes) |
long |
WindowsNativeUtil.CreateSemaphoreExA(long lpSemaphoreAttributes,
long initialCount,
long maximumCount,
String name,
int dwDesiredAccess)
Create or open semaphore handle.
|
void |
WindowsNativeUtil.CreateSymbolicLinkA(String lpSymlinkFileName,
String lpTargetFileName,
boolean targetIsDir,
boolean isDevMode)
Makes a symbolic link.
|
boolean |
WindowsNativeUtil.DeleteIpForwardEntry2(MibIpForwardRow2 entry) |
int |
WindowsNativeUtil.DeviceIoControl(long hDevice,
int dwIoControlCode,
byte[] inBuffer,
int inOff,
int inLen,
byte[] outBuffer,
int outOff,
int outLen)
Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.
|
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.
|
void |
WindowsNativeUtil.DisconnectNamedPipe(long pipeHandle) |
void |
WindowsNativeUtil.EscapeCommFunction(long handle,
int func) |
String |
WindowsNativeUtil.ExpandEnvironmentStringsA(String str) |
int |
LinuxNativeUtil.fcntl(int fd,
int code) |
int |
LinuxNativeUtil.fcntl(int fd,
int code,
byte[] param,
int off) |
int |
LinuxNativeUtil.fcntl(int fd,
int code,
int param) |
int |
LinuxNativeUtil.fcntl(int fd,
int code,
long param) |
int |
LinuxNativeUtil.fcntl(int fd,
int code,
NativeMemory param,
long off) |
void |
WindowsNativeUtil.FlushFileBuffers(long handle) |
Stat |
LinuxNativeUtil.fstat(int descriptor)
Gets information about a opened file descriptor
|
long |
WindowsNativeUtil.GetAdapterIndex(String adapterName)
returns a unfriendly adapter index based on adapter name (GUID).
|
Collection<IpAdapterAddresses> |
WindowsNativeUtil.GetAdaptersAddresses(long family,
long flags)
Returns adapter addresses.
|
CommConfig |
WindowsNativeUtil.GetCommConfig(long handle) |
int |
WindowsNativeUtil.GetCommMask(long handle) |
int |
WindowsNativeUtil.GetCommModemStatus(long handle) |
CommProp |
WindowsNativeUtil.GetCommProperties(long handle) |
DCB |
WindowsNativeUtil.GetCommState(long handle) |
CommTimeouts |
WindowsNativeUtil.GetCommTimeouts(long handle) |
CommConfig |
WindowsNativeUtil.GetDefaultCommConfigA(String name) |
String |
LinuxNativeUtil.getenv(String key)
Get an environment variable.
|
String |
WindowsNativeUtil.GetEnvironmentVariableA(String name) |
int |
WindowsNativeUtil.GetFileAttributesA(String str) |
Win32FileAttributeData |
WindowsNativeUtil.GetFileAttributesEx(String path)
Returns file attributes.
|
String |
WindowsNativeUtil.GetFinalPathNameByHandleA(long handle,
boolean normalize,
WindowsNativeUtil.Path_VolumeName volumeName) |
String |
WindowsNativeUtil.GetFinalPathNameByHandleW(long handle,
boolean normalize,
WindowsNativeUtil.Path_VolumeName volumeName) |
List<MibIpForwardRow2> |
WindowsNativeUtil.GetIpForwardTable2(int Family) |
String |
LinuxNativeUtil.getlogin_r()
Returns the username of the current user
|
String |
WindowsNativeUtil.GetModuleFileNameA(long hModule) |
int |
WindowsNativeUtil.GetOverlappedResult(long handle,
long overlapped,
boolean wait)
Gets the result from an async io operation on a handle.
|
void |
LinuxNativeUtil.getsockname(int fd,
Sockaddr sockaddr)
Writes the socket address the socket is bound to into the given Sockaddr object.
|
byte[] |
WindowsNativeUtil.GetTokenInformation(long TokenHandle,
int TokenInformationClass)
Gets information about a token
|
String |
WindowsNativeUtil.GetVolumePathNameW(String path) |
String |
LinuxNativeUtil.if_indextoname(int index)
Returns the interface name as a string or null if the index is not found.
|
Collection<IfNameIndex> |
LinuxNativeUtil.if_nameindex()
returns all network interface indices
|
int |
LinuxNativeUtil.if_nametoindex(String name)
returns the interface index or 0 if the interface is not found
|
int |
LinuxNativeUtil.ioctl(int fd,
int code)
trigger an ioctl with a device.
|
int |
LinuxNativeUtil.ioctl(int fd,
int code,
byte[] buf,
int off)
trigger an ioctl with a device.
|
int |
LinuxNativeUtil.ioctl(int fd,
int code,
long param)
trigger an ioctl with a device.
|
int |
LinuxNativeUtil.ioctl(int fd,
int code,
NativeMemory mem,
long off)
trigger an ioctl with a device.
|
Iterable<String> |
WindowsNativeUtil.iterateDeviceInterfaces(GUID deviceClass,
String enumerator,
int flags,
GUID interfaceClass)
Convenience method that uses the SetupDiGetClassDevsA+SetupDiEnumDeviceInterfaces+SetupDiGetDeviceInterfaceDetail
Syscalls to provide the return value of SetupDiGetDeviceInterfaceDetail into a iterable for easier use.
|
Iterable<RegEnumKeyExResult> |
WindowsNativeUtil.iterateRegistrySubKeys(long hkey)
Convenience method that returns an iterable over all subkeys of a hkey.
|
void |
LinuxNativeUtil.link(String target,
String linkpath)
Creates a hard link pointing to target.
|
boolean |
WindowsNativeUtil.LockFileEx(long handle,
boolean exclusive,
boolean failImmediately,
long start,
long len)
returns true if successful false if not.
|
long |
LinuxNativeUtil.lseek(int fd,
long off,
LinuxNativeUtil.lseek_whence whence) |
Stat |
LinuxNativeUtil.lstat(String path)
Identical to stat.
|
void |
LinuxNativeUtil.madvise(long ptr,
long length,
int advice) |
long |
WindowsNativeUtil.MapViewOfFileEx(long hFileMappingObject,
int dwDesiredAccess,
int dwFileOffsetHigh,
int dwFileOffsetLow,
int dwNumberOfBytesToMap,
long lpBaseAddress) |
int |
LinuxNativeUtil.memfd_create(String name,
int flags) |
void |
LinuxNativeUtil.msync(long ptr,
long off,
long len,
boolean invalidate)
Sync memory mapping to disk
|
void |
LinuxNativeUtil.munmap(long ptr,
long size)
Unmap a pointer
|
int |
LinuxNativeUtil.open(String path,
int flags)
returns the fd
|
int |
LinuxNativeUtil.open(String path,
int flags,
int mode)
returns the fd
|
long |
WindowsNativeUtil.OpenEventA(int desiredAccess,
boolean inheritHandle,
String name) |
long |
WindowsNativeUtil.OpenFileMappingA(int dwDesiredAccess,
boolean bInheritHandle,
String lpName)
Opens an existing file mapping.
|
long |
WindowsNativeUtil.OpenProcessToken(long ProcessHandle,
int DesiredAccess)
Opens a process token handle.
|
int |
LinuxNativeUtil.poll(PollFD[] fds,
int timeout)
timeout in milliseconds
|
void |
LinuxNativeUtil.pthread_cond_broadcast(long condition) |
void |
LinuxNativeUtil.pthread_cond_destroy(long condition) |
void |
LinuxNativeUtil.pthread_cond_init(long condition,
long attributes) |
void |
LinuxNativeUtil.pthread_cond_signal(long condition) |
boolean |
LinuxNativeUtil.pthread_cond_timedwait(long condition,
long mutex,
long timeout) |
void |
LinuxNativeUtil.pthread_cond_wait(long condition,
long mutex) |
void |
LinuxNativeUtil.pthread_condattr_destroy(long attributes) |
int |
LinuxNativeUtil.pthread_condattr_getpshared(long attributes) |
void |
LinuxNativeUtil.pthread_condattr_init(long attributes) |
void |
LinuxNativeUtil.pthread_condattr_setpshared(long attributes,
int value) |
void |
LinuxNativeUtil.pthread_mutex_consistent(long mutex) |
void |
LinuxNativeUtil.pthread_mutex_destroy(long mutex) |
void |
LinuxNativeUtil.pthread_mutex_init(long mutex,
long attributes) |
void |
LinuxNativeUtil.pthread_mutex_lock(long mutex) |
boolean |
LinuxNativeUtil.pthread_mutex_timedlock(long mutex,
long timeout) |
boolean |
LinuxNativeUtil.pthread_mutex_trylock(long mutex) |
void |
LinuxNativeUtil.pthread_mutex_unlock(long mutex) |
void |
LinuxNativeUtil.pthread_mutexattr_destroy(long attributes) |
int |
LinuxNativeUtil.pthread_mutexattr_getpshared(long attributes) |
int |
LinuxNativeUtil.pthread_mutexattr_getrobust(long attributes) |
int |
LinuxNativeUtil.pthread_mutexattr_gettype(long attributes) |
void |
LinuxNativeUtil.pthread_mutexattr_init(long attributes) |
void |
LinuxNativeUtil.pthread_mutexattr_setpshared(long attributes,
int value) |
void |
LinuxNativeUtil.pthread_mutexattr_setrobust(long attributes,
int value) |
void |
LinuxNativeUtil.pthread_mutexattr_settype(long attributes,
int value) |
void |
WindowsNativeUtil.PurgeComm(long handle,
int flags) |
int |
LinuxNativeUtil.read(int fd,
byte[] buffer,
int off,
int len)
Reads from a file descriptor.
|
int |
LinuxNativeUtil.read(int fd,
ByteBuffer buf,
int len)
Reads from a file descriptor.
|
int |
LinuxNativeUtil.read(int fd,
NativeMemory mem,
long off,
int len)
Reads from a file descriptor.
|
int |
WindowsNativeUtil.ReadFile(long handle,
byte[] buffer,
int off,
int len)
Reads bytes from a handle into a buffer.
|
int |
WindowsNativeUtil.ReadFile(long handle,
ByteBuffer buffer,
int len)
Reads bytes from a handle into a buffer.
|
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. |
String |
LinuxNativeUtil.readlink(String path)
returns the resolved path of the symlink
|
String |
LinuxNativeUtil.realpath(String path)
resolves all symbolic links in the given path.
|
int |
LinuxNativeUtil.recvfrom(int fd,
byte[] buffer,
int off,
int len,
int flags,
Sockaddr sockaddr)
The Output parameter sockaddr may be null if you are not interested in this information.
|
int |
LinuxNativeUtil.recvmsg(int fd,
Msghdr msghdr,
int flags)
receive a message on a socket.
|
void |
WindowsNativeUtil.RegCloseKey(long hkey) |
RegEnumKeyExResult |
WindowsNativeUtil.RegEnumKeyExA(long hkey,
int index,
int maxSubKeyLen,
int maxClassLen)
Enumerate subkeys of a registry key.
|
RegEnumValueResult |
WindowsNativeUtil.RegEnumValueA(long hkey,
int index) |
long |
WindowsNativeUtil.RegOpenKeyExA(long hkey,
String subKey,
int options,
int sam) |
RegQueryInfoKeyResult |
WindowsNativeUtil.RegQueryInfoKeyA(long hkey)
Get information about a registry key.
|
RegData |
WindowsNativeUtil.RegQueryValueExA(long hkey,
String valueName)
Read a registry value.
|
long |
WindowsNativeUtil.ReleaseSemaphore(long hSemaphore,
long lReleaseCount)
releases a "locked" semaphore
|
void |
WindowsNativeUtil.ResetEvent(long handle)
Resets the given event handle.
|
void |
LinuxNativeUtil.sem_close(long sem) |
void |
LinuxNativeUtil.sem_destroy(long sem) |
int |
LinuxNativeUtil.sem_getvalue(long sem) |
void |
LinuxNativeUtil.sem_init(long sem,
boolean interprocess,
int value)
Initializes an unnamed semaphore.
|
long |
LinuxNativeUtil.sem_open(String name,
int oflags) |
long |
LinuxNativeUtil.sem_open(String name,
int oflags,
int mode,
int value) |
void |
LinuxNativeUtil.sem_post(long sem) |
boolean |
LinuxNativeUtil.sem_timedwait(long sem,
long timeoutInMillis) |
boolean |
LinuxNativeUtil.sem_trywait(long sem) |
void |
LinuxNativeUtil.sem_unlink(String name) |
void |
LinuxNativeUtil.sem_wait(long sem) |
int |
LinuxNativeUtil.sendmsg(int fd,
Msghdr msghdr,
int flags)
send a message on a socket.
|
void |
WindowsNativeUtil.SetCommBreak(long handle) |
void |
WindowsNativeUtil.SetCommConfig(long handle,
CommConfig config) |
void |
WindowsNativeUtil.SetCommMask(long handle,
int mask) |
void |
WindowsNativeUtil.SetCommState(long handle,
DCB dcb) |
void |
WindowsNativeUtil.SetCommTimeouts(long handle,
CommTimeouts timeouts) |
void |
WindowsNativeUtil.SetDefaultCommConfigA(String name,
CommConfig config) |
void |
LinuxNativeUtil.setenv(String key,
String value,
boolean overwrite)
Set an environment variable.
|
void |
WindowsNativeUtil.SetEnvironmentVariableA(String name,
String value) |
void |
WindowsNativeUtil.SetEvent(long handle)
Sets a event identified by the handle
|
void |
WindowsNativeUtil.SetFileAttributesA(String str,
int attr) |
void |
WindowsNativeUtil.SetupComm(long handle,
int dwInQueue,
int dwOutQueue) |
void |
WindowsNativeUtil.SetupDiDestroyDeviceInfoList(long handle)
Destroys a handle created by SetupDiGetClassDevsA
|
SpDeviceInterfaceData |
WindowsNativeUtil.SetupDiEnumDeviceInterfaces(long DeviceInfoSet,
SpDeviceInfoData DeviceInfoData,
GUID InterfaceClassGuid,
int index)
Get a device element from the device set.
|
long |
WindowsNativeUtil.SetupDiGetClassDevsA(GUID ClassGuid,
String Enumerator,
long hwndParent,
int flags)
Create a device enumeration for connected hardware devices.
|
int |
LinuxNativeUtil.shm_open(String name,
int oflag,
int mode) |
void |
LinuxNativeUtil.shm_unlink(String name) |
int |
LinuxNativeUtil.socket(int domain,
int type,
int protocol)
See man socket for information on the parameters.
|
Stat |
LinuxNativeUtil.stat(String path)
Gets information about a file for a given path.
|
Stat |
PosixNativeUtil.stat(String path)
Gets information about a file for a given path.
|
Statvfs |
LinuxNativeUtil.statvfs(String path) |
void |
LinuxNativeUtil.symlink(String target,
String linkpath)
Creates a symlink pointing to target.
|
void |
PosixNativeUtil.symlink(String target,
String linkpath)
Creates a symlink pointing to target.
|
void |
WindowsNativeUtil.TransmitCommChar(long handle,
byte data) |
boolean |
WindowsNativeUtil.UnlockFileEx(long handle,
long start,
long len)
returns true if successful false if not.
|
void |
WindowsNativeUtil.UnmapViewOfFile(long address) |
void |
LinuxNativeUtil.unsetenv(String key)
removes a enviroment variable if it exists.
|
int |
WindowsNativeUtil.WaitCommEvent(long handle) |
int |
WindowsNativeUtil.WaitForMultipleObjects(long[] handles,
int millis,
boolean waitAll)
Wait for any or all event handles in a handle array.
|
boolean |
WindowsNativeUtil.WaitForSingleObject(long handle,
int millis)
Waits for a single event handle.
|
boolean |
WindowsNativeUtil.WaitNamedPipeA(String name,
long timeout)
returns true if ConnectNamedPipe will succeed.
|
int |
LinuxNativeUtil.write(int fd,
byte[] buffer,
int off,
int len)
Write to a file descriptor
returns the number of bytes written from the buffer.
|
int |
LinuxNativeUtil.write(int fd,
ByteBuffer buf,
int len)
Write to a file descriptor
returns the number of bytes written from the buffer.
|
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,
byte[] buffer,
int off,
int len)
Writes bytes from a Buffer into a handle.
|
int |
WindowsNativeUtil.WriteFile(long handle,
ByteBuffer buffer,
int len)
Writes bytes from a Buffer into a handle.
|
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. |
| Modifier and Type | Class and Description |
|---|---|
class |
ShellExecuteException |
Copyright © 2024. All rights reserved.