public interface DataOutputPlus
extends java.io.DataOutput
Modifier and Type | Method and Description |
---|---|
<R> R |
applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> c)
Safe way to operate against the underlying channel.
|
default boolean |
hasPosition()
If the implementation supports providing a position, this method returns
true , otherwise false . |
default long |
position()
Returns the current position of the underlying target like a file-pointer
or the position withing a buffer.
|
void |
write(java.nio.ByteBuffer buffer) |
void |
write(Memory memory,
long offset,
long length) |
default void |
writeUnsignedVInt(long i)
This is more efficient for storing unsigned values, both in storage and CPU burden.
|
default void |
writeVInt(long i) |
void write(java.nio.ByteBuffer buffer) throws java.io.IOException
java.io.IOException
void write(Memory memory, long offset, long length) throws java.io.IOException
java.io.IOException
<R> R applyToChannel(com.google.common.base.Function<java.nio.channels.WritableByteChannel,R> c) throws java.io.IOException
java.io.IOException
default void writeVInt(long i) throws java.io.IOException
java.io.IOException
default void writeUnsignedVInt(long i) throws java.io.IOException
java.io.IOException
default long position()
hasPosition()
.java.lang.UnsupportedOperationException
- if the implementation does not support
positiondefault boolean hasPosition()
true
, otherwise false
.Copyright © 2017 The Apache Software Foundation