public class ReadableEntityChannel extends SelectableChannel implements ReadableByteChannel
Constructor and Description |
---|
ReadableEntityChannel(ByteBuffer remainingBuffer,
SelectableChannel source,
long availableSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
blockingLock() |
SelectableChannel |
configureBlocking(boolean block) |
protected void |
implCloseChannel() |
boolean |
isBlocking() |
boolean |
isRegistered() |
SelectionKey |
keyFor(Selector sel) |
SelectorProvider |
provider() |
int |
read(ByteBuffer dst)
Reads some bytes and put them into the destination buffer.
|
SelectionKey |
register(Selector sel,
int ops,
Object att) |
int |
validOps() |
register
begin, close, end, isOpen
public ReadableEntityChannel(ByteBuffer remainingBuffer, 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 Object blockingLock()
blockingLock
in class SelectableChannel
public SelectableChannel configureBlocking(boolean block) throws IOException
configureBlocking
in class SelectableChannel
IOException
protected void implCloseChannel() throws IOException
implCloseChannel
in class AbstractInterruptibleChannel
IOException
public boolean isBlocking()
isBlocking
in class SelectableChannel
public boolean isRegistered()
isRegistered
in class SelectableChannel
public SelectionKey keyFor(Selector sel)
keyFor
in class SelectableChannel
public SelectorProvider provider()
provider
in class SelectableChannel
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
dst
- The destination buffer.IOException
public SelectionKey register(Selector sel, int ops, Object att) throws ClosedChannelException
register
in class SelectableChannel
ClosedChannelException
public int validOps()
validOps
in class SelectableChannel
Copyright © 2005–2016. All rights reserved.