public class DataOutputBuffer extends BufferedDataOutputStreamPlus
Modifier and Type | Field and Description |
---|---|
static io.netty.util.concurrent.FastThreadLocal<DataOutputBuffer> |
scratchBuffer
Scratch buffers used mostly for serializing in memory.
|
buffer
channel
Constructor and Description |
---|
DataOutputBuffer() |
DataOutputBuffer(java.nio.ByteBuffer buffer) |
DataOutputBuffer(int size) |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
asNewBuffer() |
java.nio.ByteBuffer |
buffer() |
java.nio.ByteBuffer |
buffer(boolean duplicate) |
void |
clear() |
void |
close() |
protected void |
doFlush(int count) |
protected void |
expandToFit(long count) |
void |
flush() |
byte[] |
getData() |
int |
getLength() |
boolean |
hasPosition()
If the implementation supports providing a position, this method returns
true , otherwise false . |
protected java.nio.channels.WritableByteChannel |
newDefaultChannel() |
long |
position()
Returns the current position of the underlying target like a file-pointer
or the position withing a buffer.
|
byte[] |
toByteArray() |
order, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
retrieveTemporaryBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, writeUnsignedVInt, writeVInt
public static final io.netty.util.concurrent.FastThreadLocal<DataOutputBuffer> scratchBuffer
public DataOutputBuffer()
public DataOutputBuffer(int size)
public DataOutputBuffer(java.nio.ByteBuffer buffer)
public void flush()
flush
in interface java.io.Flushable
flush
in class BufferedDataOutputStreamPlus
protected void doFlush(int count) throws java.io.IOException
doFlush
in class BufferedDataOutputStreamPlus
java.io.IOException
protected void expandToFit(long count)
protected java.nio.channels.WritableByteChannel newDefaultChannel()
newDefaultChannel
in class DataOutputStreamPlus
public void clear()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class BufferedDataOutputStreamPlus
public java.nio.ByteBuffer buffer()
public java.nio.ByteBuffer buffer(boolean duplicate)
public byte[] getData()
public int getLength()
public boolean hasPosition()
DataOutputPlus
true
, otherwise false
.public long position()
DataOutputPlus
DataOutputPlus.hasPosition()
.public java.nio.ByteBuffer asNewBuffer()
public byte[] toByteArray()
Copyright © 2009- The Apache Software Foundation