Package jnr.enxio.channels
Class WinLibCAdapter
- java.lang.Object
-
- jnr.enxio.channels.WinLibCAdapter
-
- All Implemented Interfaces:
Native.LibC
,jnr.ffi.provider.LoadedLibrary
public final class WinLibCAdapter extends java.lang.Object implements Native.LibC, jnr.ffi.provider.LoadedLibrary
MSVCRT.DLL only supports some LibC functions, but the symbols are different. This adapter maps the MSVCRT.DLL names to standard LibC names
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
WinLibCAdapter.LibMSVCRT
-
Field Summary
Fields Modifier and Type Field Description private WinLibCAdapter.LibMSVCRT
win
-
Fields inherited from interface jnr.enxio.channels.Native.LibC
F_GETFL, F_SETFL, O_NONBLOCK
-
-
Constructor Summary
Constructors Constructor Description WinLibCAdapter(WinLibCAdapter.LibMSVCRT winlibc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
close(int fd)
int
fcntl(int fd, int cmd, int data)
jnr.ffi.Runtime
getRuntime()
int
kevent(int kq, java.nio.ByteBuffer changebuf, int nchanges, java.nio.ByteBuffer eventbuf, int nevents, Native.Timespec timeout)
int
kevent(int kq, jnr.ffi.Pointer changebuf, int nchanges, jnr.ffi.Pointer eventbuf, int nevents, Native.Timespec timeout)
int
kqueue()
int
pipe(int[] fds)
int
poll(java.nio.ByteBuffer pfds, int nfds, int timeout)
int
poll(jnr.ffi.Pointer pfds, int nfds, int timeout)
int
read(int fd, byte[] data, long size)
int
read(int fd, java.nio.ByteBuffer data, long size)
int
shutdown(int s, int how)
java.lang.String
strerror(int error)
int
write(int fd, byte[] data, long size)
int
write(int fd, java.nio.ByteBuffer data, long size)
-
-
-
Field Detail
-
win
private WinLibCAdapter.LibMSVCRT win
-
-
Constructor Detail
-
WinLibCAdapter
public WinLibCAdapter(WinLibCAdapter.LibMSVCRT winlibc)
-
-
Method Detail
-
close
public int close(int fd)
- Specified by:
close
in interfaceNative.LibC
-
read
public int read(int fd, java.nio.ByteBuffer data, long size)
- Specified by:
read
in interfaceNative.LibC
-
read
public int read(int fd, byte[] data, long size)
- Specified by:
read
in interfaceNative.LibC
-
write
public int write(int fd, java.nio.ByteBuffer data, long size)
- Specified by:
write
in interfaceNative.LibC
-
write
public int write(int fd, byte[] data, long size)
- Specified by:
write
in interfaceNative.LibC
-
pipe
public int pipe(int[] fds)
- Specified by:
pipe
in interfaceNative.LibC
-
strerror
public java.lang.String strerror(int error)
- Specified by:
strerror
in interfaceNative.LibC
-
getRuntime
public jnr.ffi.Runtime getRuntime()
- Specified by:
getRuntime
in interfacejnr.ffi.provider.LoadedLibrary
-
fcntl
public int fcntl(int fd, int cmd, int data)
- Specified by:
fcntl
in interfaceNative.LibC
-
poll
public int poll(java.nio.ByteBuffer pfds, int nfds, int timeout)
- Specified by:
poll
in interfaceNative.LibC
-
poll
public int poll(jnr.ffi.Pointer pfds, int nfds, int timeout)
- Specified by:
poll
in interfaceNative.LibC
-
kqueue
public int kqueue()
- Specified by:
kqueue
in interfaceNative.LibC
-
kevent
public int kevent(int kq, java.nio.ByteBuffer changebuf, int nchanges, java.nio.ByteBuffer eventbuf, int nevents, Native.Timespec timeout)
- Specified by:
kevent
in interfaceNative.LibC
-
kevent
public int kevent(int kq, jnr.ffi.Pointer changebuf, int nchanges, jnr.ffi.Pointer eventbuf, int nevents, Native.Timespec timeout)
- Specified by:
kevent
in interfaceNative.LibC
-
shutdown
public int shutdown(int s, int how)
- Specified by:
shutdown
in interfaceNative.LibC
-
-