Package jnr.unixsocket.impl
Class AbstractNativeSocketChannel
- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.SelectableChannel
-
- java.nio.channels.spi.AbstractSelectableChannel
-
- java.nio.channels.SocketChannel
-
- jnr.unixsocket.impl.AbstractNativeSocketChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.ByteChannel,java.nio.channels.Channel,java.nio.channels.GatheringByteChannel,java.nio.channels.InterruptibleChannel,java.nio.channels.NetworkChannel,java.nio.channels.ReadableByteChannel,java.nio.channels.ScatteringByteChannel,java.nio.channels.WritableByteChannel,jnr.enxio.channels.NativeSelectableChannel
- Direct Known Subclasses:
UnixSocketChannel
public abstract class AbstractNativeSocketChannel extends java.nio.channels.SocketChannel implements java.nio.channels.ByteChannel, jnr.enxio.channels.NativeSelectableChannel
-
-
Constructor Summary
Constructors Constructor Description AbstractNativeSocketChannel(int fd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFD()protected voidimplCloseSelectableChannel()protected voidimplConfigureBlocking(boolean block)intread(java.nio.ByteBuffer dst)longread(java.nio.ByteBuffer[] dsts, int offset, int length)voidsetFD(int fd)java.nio.channels.SocketChannelshutdownInput()java.nio.channels.SocketChannelshutdownOutput()intwrite(java.nio.ByteBuffer src)longwrite(java.nio.ByteBuffer[] srcs, int offset, int length)-
Methods inherited from class java.nio.channels.SocketChannel
bind, connect, finishConnect, getLocalAddress, getRemoteAddress, isConnected, isConnectionPending, open, open, read, setOption, socket, validOps, write
-
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
-
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
-
-
-
Method Detail
-
setFD
public void setFD(int fd)
-
getFD
public final int getFD()
- Specified by:
getFDin interfacejnr.enxio.channels.NativeSelectableChannel
-
implCloseSelectableChannel
protected void implCloseSelectableChannel() throws java.io.IOException- Specified by:
implCloseSelectableChannelin classjava.nio.channels.spi.AbstractSelectableChannel- Throws:
java.io.IOException
-
implConfigureBlocking
protected void implConfigureBlocking(boolean block) throws java.io.IOException- Specified by:
implConfigureBlockingin classjava.nio.channels.spi.AbstractSelectableChannel- Throws:
java.io.IOException
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Specified by:
readin classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
read
public long read(java.nio.ByteBuffer[] dsts, int offset, int length) throws java.io.IOException- Specified by:
readin interfacejava.nio.channels.ScatteringByteChannel- Specified by:
readin classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
write
public int write(java.nio.ByteBuffer src) throws java.io.IOException- Specified by:
writein interfacejava.nio.channels.WritableByteChannel- Specified by:
writein classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
write
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException- Specified by:
writein interfacejava.nio.channels.GatheringByteChannel- Specified by:
writein classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
shutdownInput
public java.nio.channels.SocketChannel shutdownInput() throws java.io.IOException- Specified by:
shutdownInputin classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
shutdownOutput
public java.nio.channels.SocketChannel shutdownOutput() throws java.io.IOException- Specified by:
shutdownOutputin classjava.nio.channels.SocketChannel- Throws:
java.io.IOException
-
-