|
XNIO API 2.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. |
|
BlockingWritableByteChannel(StreamSinkChannel delegate,
long writeTimeout,
TimeUnit writeTimeoutUnit)
Construct a new instance. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
boolean |
isOpen()
|
void |
setWriteTimeout(long writeTimeout,
TimeUnit writeTimeoutUnit)
Set the write timeout. |
int |
write(ByteBuffer src)
Perform a blocking write operation. |
long |
write(ByteBuffer[] srcs)
Perform a blocking, gathering write operation. |
long |
write(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 to
public BlockingWritableByteChannel(StreamSinkChannel delegate,
long writeTimeout,
TimeUnit writeTimeoutUnit)
delegate - the channel to forward I/O operations towriteTimeout - the write timeoutwriteTimeoutUnit - the write timeout unit| Method Detail |
|---|
public void setWriteTimeout(long writeTimeout,
TimeUnit writeTimeoutUnit)
writeTimeout - the write timeoutwriteTimeoutUnit - the write timeout unit
public long write(ByteBuffer[] srcs,
int offset,
int length)
throws IOException
write in interface GatheringByteChannelsrcs - the source buffersoffset - the offset into the destination buffer arraylength - the number of buffers to write from
IOException - if an I/O error occurs
public long write(ByteBuffer[] srcs)
throws IOException
write in interface GatheringByteChannelsrcs - the source buffers
IOException - if an I/O error occurs
public int write(ByteBuffer src)
throws IOException
write in interface WritableByteChannelsrc - the source buffer
IOException - if an I/O error occurspublic boolean isOpen()
isOpen in interface Channel
public void flush()
throws IOException
flush in interface FlushableIOException
public void close()
throws IOException
close in interface Closeableclose in interface ChannelIOException
|
XNIO API 2.1.0.CR2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||