public interface DataOutputView extends DataOutput, Closeable, Flushable, Serializable
| Modifier and Type | Field and Description |
|---|---|
static byte |
ONE |
static byte |
TWO |
static byte |
ZERO |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
byte[] |
getBuffer() |
default void |
write(byte[] b) |
default void |
write(byte[] b,
int off,
int len) |
default void |
writeBoolean(boolean v)
Writes a 1 byte boolean.
|
void |
writeBytes(byte[] b) |
void |
writeBytes(byte[] b,
int off,
int len) |
default void |
writeChar(int v)
Writes a 2 byte char.
|
default void |
writeDouble(double v)
Writes a 8 byte double.
|
default void |
writeFloat(float v)
Writes a 4 byte float.
|
default void |
writeInt(int v)
Writes a 4 byte int.
|
default void |
writeLong(long i)
Writes an 8 byte long.
|
default void |
writeOptionalBoolean(Boolean b)
Writes an optional
Boolean. |
default void |
writeOptionalDouble(Double v)
Writes an optional
Double. |
default void |
writeOptionalFloat(Float v)
Writes an optional
Float. |
default void |
writeOptionalInt(Integer integer)
Writes an optional
Integer. |
default void |
writeOptionalLong(Long l)
Writes an optional
Long. |
default void |
writeOptionalVInt(Integer integer) |
default void |
writeOptionalVLong(Long l) |
default void |
writeOptionalZLong(Long l) |
default void |
writeShort(int v)
Writes a 2 byte short.
|
default void |
writeVDouble(double value,
double precision,
boolean optimizePositive)
Writes a 1-9 byte double with reduced precision.
|
default void |
writeVFloat(float value,
float precision)
Writes a 1-5 byte float with reduced precision.
|
default void |
writeVInt(int v)
Writes an int in a variable-length format.
|
default void |
writeVLong(long i)
Writes a long in a variable-length format.
|
default void |
writeZInt(int v)
Writes a
zig-zag-encoded
variable-length integer. |
default void |
writeZLong(long i)
Writes a long in a variable-length format.
|
write, writeByte, writeBytes, writeChars, writeUTFstatic final byte ZERO
static final byte ONE
static final byte TWO
void writeBytes(byte[] b)
throws IOException
IOExceptionvoid writeBytes(byte[] b,
int off,
int len)
throws IOException
IOExceptiondefault void write(byte[] b)
throws IOException
write in interface DataOutputIOExceptiondefault void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputIOExceptiondefault void writeBoolean(boolean v)
throws IOException
writeBoolean in interface DataOutputIOExceptiondefault void writeOptionalBoolean(Boolean b) throws IOException
Boolean.IOExceptiondefault void writeShort(int v)
throws IOException
writeShort in interface DataOutputIOExceptiondefault void writeChar(int v)
throws IOException
writeChar in interface DataOutputIOExceptiondefault void writeInt(int v)
throws IOException
writeInt in interface DataOutputIOExceptiondefault void writeVInt(int v)
throws IOException
writeInt(int) or writeZInt(int)IOExceptiondefault void writeZInt(int v)
throws IOException
zig-zag-encoded
variable-length integer. This is typically useful to
write small signed ints and is equivalent to calling writeVInt(BitUtil.zigZagEncode(i)).IOExceptionDataInputView.readZInt()default void writeOptionalInt(Integer integer) throws IOException
Integer.IOExceptiondefault void writeOptionalVInt(Integer integer) throws IOException
IOExceptiondefault void writeLong(long i)
throws IOException
writeLong in interface DataOutputIOExceptiondefault void writeVLong(long i)
throws IOException
writeLong(long) or writeZLong(long)
for negative numbers.IOExceptiondefault void writeZLong(long i)
throws IOException
writeVLong(long)IOExceptiondefault void writeOptionalLong(Long l) throws IOException
Long.IOExceptiondefault void writeOptionalVLong(Long l) throws IOException
IOExceptiondefault void writeOptionalZLong(Long l) throws IOException
IOExceptiondefault void writeFloat(float v)
throws IOException
writeFloat in interface DataOutputIOExceptiondefault void writeVFloat(float value,
float precision)
throws IOException
IOExceptiondefault void writeVDouble(double value,
double precision,
boolean optimizePositive)
throws IOException
IOExceptiondefault void writeOptionalFloat(Float v) throws IOException
Float.IOExceptiondefault void writeDouble(double v)
throws IOException
writeDouble in interface DataOutputIOExceptiondefault void writeOptionalDouble(Double v) throws IOException
Double.IOExceptionbyte[] getBuffer()
void flush()
throws IOException
flush in interface FlushableIOExceptionvoid close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionCopyright © 2022. All rights reserved.