- java.lang.Object
-
- jnr.enxio.channels.WinLibCAdapter
-
- All Implemented Interfaces:
Native.LibC,jnr.ffi.provider.LoadedLibrary
public final class WinLibCAdapter extends 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 interfaceWinLibCAdapter.LibMSVCRT
-
Field Summary
-
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 intclose(int fd)intfcntl(int fd, int cmd, int data)jnr.ffi.RuntimegetRuntime()intkevent(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Native.Timespec timeout)intkevent(int kq, jnr.ffi.Pointer changebuf, int nchanges, jnr.ffi.Pointer eventbuf, int nevents, Native.Timespec timeout)intkqueue()intpipe(int[] fds)intpoll(ByteBuffer pfds, int nfds, int timeout)intpoll(jnr.ffi.Pointer pfds, int nfds, int timeout)intread(int fd, byte[] data, long size)intread(int fd, ByteBuffer data, long size)intshutdown(int s, int how)Stringstrerror(int error)intwrite(int fd, byte[] data, long size)intwrite(int fd, ByteBuffer data, long size)
-
-
-
Constructor Detail
-
WinLibCAdapter
public WinLibCAdapter(WinLibCAdapter.LibMSVCRT winlibc)
-
-
Method Detail
-
close
public int close(int fd)
- Specified by:
closein interfaceNative.LibC
-
read
public int read(int fd, ByteBuffer data, long size)- Specified by:
readin interfaceNative.LibC
-
read
public int read(int fd, byte[] data, long size)- Specified by:
readin interfaceNative.LibC
-
write
public int write(int fd, ByteBuffer data, long size)- Specified by:
writein interfaceNative.LibC
-
write
public int write(int fd, byte[] data, long size)- Specified by:
writein interfaceNative.LibC
-
pipe
public int pipe(int[] fds)
- Specified by:
pipein interfaceNative.LibC
-
strerror
public String strerror(int error)
- Specified by:
strerrorin interfaceNative.LibC
-
getRuntime
public jnr.ffi.Runtime getRuntime()
- Specified by:
getRuntimein interfacejnr.ffi.provider.LoadedLibrary
-
fcntl
public int fcntl(int fd, int cmd, int data)- Specified by:
fcntlin interfaceNative.LibC
-
poll
public int poll(ByteBuffer pfds, int nfds, int timeout)
- Specified by:
pollin interfaceNative.LibC
-
poll
public int poll(jnr.ffi.Pointer pfds, int nfds, int timeout)- Specified by:
pollin interfaceNative.LibC
-
kqueue
public int kqueue()
- Specified by:
kqueuein interfaceNative.LibC
-
kevent
public int kevent(int kq, ByteBuffer changebuf, int nchanges, ByteBuffer eventbuf, int nevents, Native.Timespec timeout)- Specified by:
keventin 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:
keventin interfaceNative.LibC
-
shutdown
public int shutdown(int s, int how)- Specified by:
shutdownin interfaceNative.LibC
-
-