org.apache.cassandra.io.util

## Interface DataOutputPlus

All Superinterfaces:
  java.io.DataOutput

All Known Implementing Classes:
  BufferedDataOutputStreamPlus, DataOutputBuffer, DataOutputBufferFixed, DataOutputStreamPlus, EncodedDataOutputStream, SafeMemoryWriter, UnbufferedDataOutputStreamPlus, WrappedDataOutputStreamPlus

    public interface DataOutputPlus
    extends java.io.DataOutput

Extension to DataOutput that provides for writing ByteBuffer and Memory, potentially with an efficient implementation that is zero copy or at least has reduced bounds checking overhead.

### Method Summary

All Methods Instance Methods Abstract Methods
`<R> R` `applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> c)` Safe way to operate against the underlying channel.
`void` `write(java.nio.ByteBuffer buffer)`
`void` `write(Memory memory, long offset, long length)`

### Methods inherited from interface java.io.DataOutput

`write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF`

### Method Detail

#### write

    void write(java.nio.ByteBuffer buffer)
        throws java.io.IOException

Throws:
  `java.io.IOException`

#### write

    void write(Memory memory,
               long offset,
               long length)
        throws java.io.IOException

Throws:
  `java.io.IOException`

#### applyToChannel

    <R> R applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> c)
                  throws java.io.IOException

Safe way to operate against the underlying channel. Impossible to stash a reference to the channel and forget to flush

Throws:
  `java.io.IOException`