public class DataOutputBuffer extends BufferedDataOutputStreamPlus
buffer, strictFlushingchannel| Modifier | Constructor and Description |
|---|---|
|
DataOutputBuffer() |
protected |
DataOutputBuffer(java.nio.ByteBuffer buffer) |
|
DataOutputBuffer(int size) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
buffer() |
java.nio.ByteBuffer |
buffer(boolean duplicate) |
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() |
applyToChannel, order, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUnsignedVInt, writeUTF, writeVIntretrieveTemporaryBufferpublic DataOutputBuffer()
public DataOutputBuffer(int size)
protected DataOutputBuffer(java.nio.ByteBuffer buffer)
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class BufferedDataOutputStreamPlusjava.io.IOExceptionprotected void doFlush(int count)
throws java.io.IOException
doFlush in class BufferedDataOutputStreamPlusjava.io.IOExceptionprotected void expandToFit(long count)
protected java.nio.channels.WritableByteChannel newDefaultChannel()
newDefaultChannel in class DataOutputStreamPluspublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class BufferedDataOutputStreamPluspublic java.nio.ByteBuffer buffer()
public java.nio.ByteBuffer buffer(boolean duplicate)
public byte[] getData()
public int getLength()
public boolean hasPosition()
DataOutputPlustrue, otherwise false.public long position()
DataOutputPlusDataOutputPlus.hasPosition().public byte[] toByteArray()
Copyright © 2020 The Apache Software Foundation