public void writeTo(WritableByteChannel channel) throws IOException {
        for (ByteBuffer buffer : toDirectByteBuffers()) {
            channel.write(buffer);
        }
    }
public void writeTo ( WritableByteChannel channel ) throws IOException { for ( ByteBuffer buffer : toDirectByteBuffers ( ) ) { channel . write ( buffer ) ; } }
Writes the buffer contents to the given byte channel.

@param channel
@throws IOException