public class DataOutputBuffer extends BufferedDataOutputStreamPlus
Modifier and Type | Field and Description |
---|---|
static io.netty.util.Recycler<DataOutputBuffer> |
RECYCLER |
buffer, strictFlushing
channel
Modifier | Constructor and Description |
---|---|
|
DataOutputBuffer() |
protected |
DataOutputBuffer(java.nio.ByteBuffer buffer,
io.netty.util.Recycler.Handle handle) |
|
DataOutputBuffer(int size) |
protected |
DataOutputBuffer(int size,
io.netty.util.Recycler.Handle handle) |
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
asNewBuffer() |
java.nio.ByteBuffer |
buffer() |
void |
close() |
protected void |
doFlush(int 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.
|
protected void |
reallocate(long count) |
void |
recycle() |
byte[] |
toByteArray() |
applyToChannel, order, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUnsignedVInt, writeUTF, writeVInt
retrieveTemporaryBuffer
public static final io.netty.util.Recycler<DataOutputBuffer> RECYCLER
public DataOutputBuffer()
public DataOutputBuffer(int size)
protected DataOutputBuffer(int size, io.netty.util.Recycler.Handle handle)
protected DataOutputBuffer(java.nio.ByteBuffer buffer, io.netty.util.Recycler.Handle handle)
public void recycle()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class BufferedDataOutputStreamPlus
java.io.IOException
protected void doFlush(int count) throws java.io.IOException
doFlush
in class BufferedDataOutputStreamPlus
java.io.IOException
protected void reallocate(long count)
protected java.nio.channels.WritableByteChannel newDefaultChannel()
newDefaultChannel
in class DataOutputStreamPlus
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 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 © 2016 The Apache Software Foundation