Package org.apache.cassandra.io.util
Class DataOutputBufferFixed
java.lang.Object
java.io.OutputStream
org.apache.cassandra.io.util.DataOutputStreamPlus
org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
org.apache.cassandra.io.util.DataOutputBuffer
org.apache.cassandra.io.util.DataOutputBufferFixed
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable,DataOutputPlus
- Direct Known Subclasses:
StreamingDataOutputPlusFixed
An implementation of the DataOutputStream interface using a FastByteArrayOutputStream and exposing
its buffer so copies can be avoided. This version does not expand if it runs out of capacity and
throws BufferOverflowException instead.
This class is completely thread unsafe.
-
Field Summary
Fields inherited from class org.apache.cassandra.io.util.DataOutputBuffer
scratchBufferFields inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
bufferFields inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
channel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()protected voiddoFlush(int count) protected voidexpandToFit(long newSize) Methods inherited from class org.apache.cassandra.io.util.DataOutputBuffer
asNewBuffer, asString, buffer, buffer, close, flush, getData, getLength, hasPosition, newDefaultChannel, position, setBuffer, toByteArray, unsafeGetBufferAndFlipMethods inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
allocate, order, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeMostSignificantBytes, writeShort, writeUTFMethods inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
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, maxBytesInPage, paddedPosition, padToPageBoundary, write, writeUnsignedVInt, writeUnsignedVInt, writeUnsignedVInt32, writeVInt, writeVInt, writeVInt32
-
Constructor Details
-
DataOutputBufferFixed
public DataOutputBufferFixed() -
DataOutputBufferFixed
public DataOutputBufferFixed(int size) -
DataOutputBufferFixed
-
-
Method Details
-
doFlush
- Overrides:
doFlushin classDataOutputBuffer- Throws:
IOException
-
expandToFit
protected void expandToFit(long newSize) - Overrides:
expandToFitin classDataOutputBuffer
-
clear
public void clear()- Overrides:
clearin classDataOutputBuffer
-