Class ChannelUtils
java.lang.Object
org.gridgain.internal.snapshots.buffer.ChannelUtils
Utility methods for working with
WritableByteChannel.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteAll(WritableByteChannel channel, ByteBuffer buffer) Writes all bytes from buffer to a blocking channel.
-
Method Details
-
writeAll
Writes all bytes from buffer to a blocking channel.This method loops until all bytes from the buffer are written. Non-blocking
SelectableChannels will cause anIllegalArgumentException.- Parameters:
channel- Blocking channel to write to.buffer- Buffer containing data to write.- Throws:
IllegalArgumentException- If the channel is in non-blocking mode.IOException- If an I/O error occurs, or if the channel returns 0 with data remaining.
-