|
XNIO API 2.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.xnio.channels.BlockingWritableByteChannel
public class BlockingWritableByteChannel
A blocking wrapper for a StreamChannel
. Write operations will block until some data may be transferred.
Once any amount of data is written, the operation will return.
Constructor Summary | |
---|---|
BlockingWritableByteChannel(StreamSinkChannel delegate)
Construct a new instance. |
Method Summary | |
---|---|
void |
close()
|
void |
flush()
|
boolean |
isOpen()
|
int |
write(java.nio.ByteBuffer src)
Perform a blocking write operation. |
long |
write(java.nio.ByteBuffer[] srcs)
Perform a blocking, gathering write operation. |
long |
write(java.nio.ByteBuffer[] srcs,
int offset,
int length)
Perform a blocking, gathering write operation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockingWritableByteChannel(StreamSinkChannel delegate)
delegate
- the channel to forward I/O operations toMethod Detail |
---|
public long write(java.nio.ByteBuffer[] srcs, int offset, int length) throws java.io.IOException
write
in interface java.nio.channels.GatheringByteChannel
srcs
- the source buffersoffset
- the offset into the destination buffer arraylength
- the number of buffers to write from
java.io.IOException
- if an I/O error occurspublic long write(java.nio.ByteBuffer[] srcs) throws java.io.IOException
write
in interface java.nio.channels.GatheringByteChannel
srcs
- the source buffers
java.io.IOException
- if an I/O error occurspublic int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
src
- the source buffer
java.io.IOException
- if an I/O error occurspublic boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.nio.channels.Channel
java.io.IOException
|
XNIO API 2.0.0.GA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |