Package org.apache.cassandra.io.util
Class WrappedDataOutputStreamPlus
java.lang.Object
java.io.OutputStream
org.apache.cassandra.io.util.DataOutputStreamPlus
org.apache.cassandra.io.util.UnbufferedDataOutputStreamPlus
org.apache.cassandra.io.util.WrappedDataOutputStreamPlus
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable,DataOutputPlus
When possible use
WrappedDataOutputStreamPlus instead of this class, as it will
be more efficient when using Plus methods. This class is only for situations where it cannot be used.
The channel provided by this class is just a wrapper around the output stream.-
Field Summary
FieldsFields inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
channel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()voidwrite(byte[] buffer, int offset, int count) Writescountbytes from the byte arraybufferstarting atoffsetto this RandomAccessFile starting at the current file pointer..voidwrite(int oneByte) Writes the specified byteoneByteto this RandomAccessFile starting at the current file pointer.Methods inherited from class org.apache.cassandra.io.util.UnbufferedDataOutputStreamPlus
write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF, writeUTFMethods inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
newDefaultChannel, retrieveTemporaryBufferMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.io.util.DataOutputPlus
bytesLeftInPage, hasPosition, maxBytesInPage, paddedPosition, padToPageBoundary, position, write, writeMostSignificantBytes, writeUnsignedVInt, writeUnsignedVInt, writeUnsignedVInt32, writeVInt, writeVInt, writeVInt32
-
Field Details
-
out
-
-
Constructor Details
-
WrappedDataOutputStreamPlus
-
WrappedDataOutputStreamPlus
-
-
Method Details
-
write
Description copied from class:UnbufferedDataOutputStreamPlusWritescountbytes from the byte arraybufferstarting atoffsetto this RandomAccessFile starting at the current file pointer..- Specified by:
writein interfaceDataOutput- Specified by:
writein classUnbufferedDataOutputStreamPlus- Parameters:
buffer- the bytes to be writtenoffset- offset in buffer to get bytescount- number of bytes in buffer to write- Throws:
IOException- If an error occurs attempting to write to this RandomAccessFile.
-
write
Description copied from class:UnbufferedDataOutputStreamPlusWrites the specified byteoneByteto this RandomAccessFile starting at the current file pointer. Only the low order byte ofoneByteis written.- Specified by:
writein interfaceDataOutput- Specified by:
writein classUnbufferedDataOutputStreamPlus- Parameters:
oneByte- the byte to be written- Throws:
IOException- If an error occurs attempting to write to this RandomAccessFile.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-