|
XNIO API 2.0.2.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.xnio.channels.BlockingReadableByteChannel
public class BlockingReadableByteChannel

A blocking wrapper for a StreamSourceChannel. Read operations will block until some data may be transferred.
Once any amount of data is read, the operation will return.
| Constructor Summary | |
|---|---|
BlockingReadableByteChannel(StreamSourceChannel delegate)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
close()
|
boolean |
isOpen()
|
int |
read(java.nio.ByteBuffer dst)
Perform a blocking read operation. |
long |
read(java.nio.ByteBuffer[] dsts)
Perform a blocking, scattering read operation. |
long |
read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
Perform a blocking, scattering read operation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BlockingReadableByteChannel(StreamSourceChannel delegate)
delegate - the channel to forward I/O operations to| Method Detail |
|---|
public long read(java.nio.ByteBuffer[] dsts,
int offset,
int length)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneldsts - the destination buffersoffset - the offset into the destination buffer arraylength - the number of buffers to read into
java.io.IOException - if an I/O error occurs
public long read(java.nio.ByteBuffer[] dsts)
throws java.io.IOException
read in interface java.nio.channels.ScatteringByteChanneldsts - the destination buffers
java.io.IOException - if an I/O error occurs
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneldst - the destination buffer
java.io.IOException - if an I/O error occurspublic boolean isOpen()
isOpen in interface java.nio.channels.Channel
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.nio.channels.Channeljava.io.IOException
|
XNIO API 2.0.2.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||