APIdia Launch Partner
Top Description Constructors Methods
sun.nio.ch

pack-priv abstract Class NativeDispatcher

extends Object
Class Inheritance
Known Direct Subclasses
sun.nio.ch.UnixDispatcher, sun.nio.ch.FileDispatcher
Imports
java.io.FileDescriptor, .IOException

Allows different platforms to call different native methods for read and write operations.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract void
pack-priv void
dup(FileDescriptor
the file descriptor to duplicate
fd1
,
FileDescriptor
the new file descriptor, the socket or file that it is connected to will be closed by this method
fd2
)

Duplicates a file descriptor.

pack-priv void
implPreClose(FileDescriptor fd, Thread reader, Thread writer)

This method does nothing by default.

pack-priv boolean
needsPositionLock()

Returns true if pread/pwrite needs to be synchronized with position sensitive methods.

pack-priv int
pread(FileDescriptor fd, long address, int len, long position)

pack-priv final void
preClose(FileDescriptor fd, Thread reader, Thread writer)

Prepare the given file descriptor for closing.

pack-priv int
pwrite(FileDescriptor fd, long address, int len, long position)

pack-priv abstract int
read(FileDescriptor fd, long address, int len)

pack-priv abstract long
readv(FileDescriptor fd, long address, int len)

pack-priv abstract int
write(FileDescriptor fd, long address, int len)

pack-priv abstract long
writev(FileDescriptor fd, long address, int len)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NativeDispatcherback to summary
pack-priv NativeDispatcher()

Method Detail

closeback to summary
pack-priv abstract void close(FileDescriptor fd) throws IOException
dupback to summary
pack-priv void dup(FileDescriptor fd1, FileDescriptor fd2) throws IOException

Duplicates a file descriptor.

Parameters
fd1:FileDescriptor

the file descriptor to duplicate

fd2:FileDescriptor

the new file descriptor, the socket or file that it is connected to will be closed by this method

implPreCloseback to summary
pack-priv void implPreClose(FileDescriptor fd, Thread reader, Thread writer) throws IOException

This method does nothing by default. On Unix systems the file descriptor is dup'ed to a special fd and native threads signalled.

needsPositionLockback to summary
pack-priv boolean needsPositionLock()

Returns true if pread/pwrite needs to be synchronized with position sensitive methods.

preadback to summary
pack-priv int pread(FileDescriptor fd, long address, int len, long position) throws IOException
preCloseback to summary
pack-priv final void preClose(FileDescriptor fd, Thread reader, Thread writer) throws IOException

Prepare the given file descriptor for closing. If a virtual thread is blocked on the file descriptor then it is unparked so that it stops polling. On Unix systems, if a platform thread is blocked on the file descriptor then the file descriptor is dup'ed to a special fd and the thread signalled so that the syscall fails with EINTR.

pwriteback to summary
pack-priv int pwrite(FileDescriptor fd, long address, int len, long position) throws IOException
readback to summary
pack-priv abstract int read(FileDescriptor fd, long address, int len) throws IOException
readvback to summary
pack-priv abstract long readv(FileDescriptor fd, long address, int len) throws IOException
writeback to summary
pack-priv abstract int write(FileDescriptor fd, long address, int len) throws IOException
writevback to summary
pack-priv abstract long writev(FileDescriptor fd, long address, int len) throws IOException