org.apache.cassandra.io.util

## Class DataOutputStreamPlus

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.cassandra.io.util.AbstractDataOutput
    - - org.apache.cassandra.io.util.DataOutputStreamPlus

All Implemented Interfaces:
  java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.lang.AutoCloseable, DataOutputPlus

Direct Known Subclasses:
  DataOutputBuffer, DataOutputStreamAndChannel

    public class DataOutputStreamPlus
    extends AbstractDataOutput
    implements DataOutputPlus

When possible use `DataOutputStreamAndChannel` instead of this class, as it will be more efficient. This class is only for situations where it cannot be used

### Field Summary

Fields
`protected java.io.OutputStream` `out`

### Constructor Summary

Constructors
Constructor and Description
`DataOutputStreamPlus(java.io.OutputStream out)`

### Method Summary

Methods
`void` `close()`
`void` `flush()`
`void` `write(byte[] buffer, int offset, int count)` Writes `count` bytes from the byte array `buffer` starting at `offset` to this RandomAccessFile starting at the current file pointer..
`void` `write(int oneByte)` Writes the specified byte `oneByte` to this RandomAccessFile starting at the current file pointer.

### Methods inherited from class org.apache.cassandra.io.util.AbstractDataOutput

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.cassandra.io.util.DataOutputPlus

`write, write`

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

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

### Field Detail

#### out

    protected final java.io.OutputStream out

### Constructor Detail

#### DataOutputStreamPlus

    public DataOutputStreamPlus(java.io.OutputStream out)

### Method Detail

#### write

    public void write(byte[] buffer,
             int offset,
             int count)
               throws java.io.IOException

Description copied from class: `AbstractDataOutput`
Writes `count` bytes from the byte array `buffer` starting at `offset` to this RandomAccessFile starting at the current file pointer..

Specified by:
  `write` in interface `java.io.DataOutput`
Specified by:
  `write` in class `AbstractDataOutput`
Parameters:
  `buffer` - the bytes to be written
  `offset` - offset in buffer to get bytes
  `count` - number of bytes in buffer to write
Throws:
  `java.io.IOException` - If an error occurs attempting to write to this RandomAccessFile.

#### write

    public void write(int oneByte)
               throws java.io.IOException

Description copied from class: `AbstractDataOutput`
Writes the specified byte `oneByte` to this RandomAccessFile starting at the current file pointer. Only the low order byte of `oneByte` is written.

Specified by:
  `write` in interface `java.io.DataOutput`
Specified by:
  `write` in class `AbstractDataOutput`
Parameters:
  `oneByte` - the byte to be written
Throws:
  `java.io.IOException` - If an error occurs attempting to write to this RandomAccessFile.

#### close

    public void close()
               throws java.io.IOException

Specified by:
  `close` in interface `java.io.Closeable`
Specified by:
  `close` in interface `java.lang.AutoCloseable`
Overrides:
  `close` in class `java.io.OutputStream`
Throws:
  `java.io.IOException`

#### flush

    public void flush()
               throws java.io.IOException

Specified by:
  `flush` in interface `java.io.Flushable`
Overrides:
  `flush` in class `java.io.OutputStream`
Throws:
  `java.io.IOException`