jnr.enxio.channels
Class NativeSocketChannel

java.lang.Object
  extended by java.nio.channels.spi.AbstractInterruptibleChannel
      extended by java.nio.channels.SelectableChannel
          extended by java.nio.channels.spi.AbstractSelectableChannel
              extended by jnr.enxio.channels.NativeSocketChannel
All Implemented Interfaces:
Closeable, ByteChannel, Channel, InterruptibleChannel, ReadableByteChannel, WritableByteChannel, NativeSelectableChannel

public class NativeSocketChannel
extends AbstractSelectableChannel
implements ByteChannel, NativeSelectableChannel


Constructor Summary
NativeSocketChannel(int fd)
           
NativeSocketChannel(int fd, int ops)
           
 
Method Summary
 int getFD()
           
protected  void implCloseSelectableChannel()
           
protected  void implConfigureBlocking(boolean block)
           
 int read(ByteBuffer dst)
           
 void shutdownInput()
           
 void shutdownOutput()
           
 int validOps()
           
 int write(ByteBuffer src)
           
 
Methods inherited from class java.nio.channels.spi.AbstractSelectableChannel
blockingLock, configureBlocking, implCloseChannel, isBlocking, isRegistered, keyFor, provider, register
 
Methods inherited from class java.nio.channels.SelectableChannel
register
 
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Constructor Detail

NativeSocketChannel

public NativeSocketChannel(int fd)

NativeSocketChannel

public NativeSocketChannel(int fd,
                           int ops)
Method Detail

implCloseSelectableChannel

protected void implCloseSelectableChannel()
                                   throws IOException
Specified by:
implCloseSelectableChannel in class AbstractSelectableChannel
Throws:
IOException

implConfigureBlocking

protected void implConfigureBlocking(boolean block)
                              throws IOException
Specified by:
implConfigureBlocking in class AbstractSelectableChannel
Throws:
IOException

validOps

public final int validOps()
Specified by:
validOps in class SelectableChannel

getFD

public final int getFD()
Specified by:
getFD in interface NativeSelectableChannel

read

public int read(ByteBuffer dst)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Throws:
IOException

write

public int write(ByteBuffer src)
          throws IOException
Specified by:
write in interface WritableByteChannel
Throws:
IOException

shutdownInput

public void shutdownInput()
                   throws IOException
Throws:
IOException

shutdownOutput

public void shutdownOutput()
                    throws IOException
Throws:
IOException


Copyright © 2013. All Rights Reserved.