public class ReadableEntityChannel
extends java.nio.channels.SelectableChannel
implements java.nio.channels.ReadableByteChannel
Constructor and Description |
---|
ReadableEntityChannel(java.nio.ByteBuffer remainingBuffer,
java.nio.channels.SelectableChannel source,
long availableSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
blockingLock() |
java.nio.channels.SelectableChannel |
configureBlocking(boolean block) |
protected void |
implCloseChannel() |
boolean |
isBlocking() |
boolean |
isRegistered() |
java.nio.channels.SelectionKey |
keyFor(java.nio.channels.Selector sel) |
java.nio.channels.spi.SelectorProvider |
provider() |
int |
read(java.nio.ByteBuffer dst)
Reads some bytes and put them into the destination buffer.
|
java.nio.channels.SelectionKey |
register(java.nio.channels.Selector sel,
int ops,
java.lang.Object att) |
int |
validOps() |
begin, close, end, isOpen
public ReadableEntityChannel(java.nio.ByteBuffer remainingBuffer, java.nio.channels.SelectableChannel source, long availableSize)
remainingBuffer
- The byte buffer remaining from previous read processing.source
- The source channel.availableSize
- The available size that can be read from the source channel.public java.lang.Object blockingLock()
blockingLock
in class java.nio.channels.SelectableChannel
public java.nio.channels.SelectableChannel configureBlocking(boolean block) throws java.io.IOException
configureBlocking
in class java.nio.channels.SelectableChannel
java.io.IOException
protected void implCloseChannel() throws java.io.IOException
implCloseChannel
in class java.nio.channels.spi.AbstractInterruptibleChannel
java.io.IOException
public boolean isBlocking()
isBlocking
in class java.nio.channels.SelectableChannel
public boolean isRegistered()
isRegistered
in class java.nio.channels.SelectableChannel
public java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector sel)
keyFor
in class java.nio.channels.SelectableChannel
public java.nio.channels.spi.SelectorProvider provider()
provider
in class java.nio.channels.SelectableChannel
public int read(java.nio.ByteBuffer dst) throws java.io.IOException
read
in interface java.nio.channels.ReadableByteChannel
dst
- The destination buffer.java.io.IOException
public java.nio.channels.SelectionKey register(java.nio.channels.Selector sel, int ops, java.lang.Object att) throws java.nio.channels.ClosedChannelException
register
in class java.nio.channels.SelectableChannel
java.nio.channels.ClosedChannelException
public int validOps()
validOps
in class java.nio.channels.SelectableChannel
Copyright © 2005-2012. All Rights Reserved.