public interface BinaryWriter
reset()
. 2. Write
each field by writeXX or setNullAt. (Same field can not be written repeatedly.) 3. Invoke complete()
.Modifier and Type | Interface and Description |
---|---|
static interface |
BinaryWriter.ValueSetter
Accessor for setting the elements of a binary writer during runtime.
|
Modifier and Type | Method and Description |
---|---|
void |
complete()
Finally, complete write to set real size to binary.
|
static BinaryWriter.ValueSetter |
createValueSetter(DataType elementType)
Creates an accessor for setting the elements of a binary writer during runtime.
|
static BinaryWriter.ValueSetter |
createValueSetter(DataType elementType,
Serializer<?> serializer) |
void |
reset()
Reset writer to prepare next write.
|
void |
setNullAt(int pos)
Set null to this field.
|
static void |
write(BinaryWriter writer,
int pos,
Object o,
DataType type,
Serializer<?> serializer)
Deprecated.
Use
#createValueSetter(DataType) for avoiding logical types during
runtime. |
void |
writeArray(int pos,
InternalArray value,
InternalArraySerializer serializer) |
void |
writeBinary(int pos,
byte[] bytes) |
void |
writeBoolean(int pos,
boolean value) |
void |
writeByte(int pos,
byte value) |
void |
writeDecimal(int pos,
Decimal value,
int precision) |
void |
writeDouble(int pos,
double value) |
void |
writeFloat(int pos,
float value) |
void |
writeInt(int pos,
int value) |
void |
writeLong(int pos,
long value) |
void |
writeMap(int pos,
InternalMap value,
InternalMapSerializer serializer) |
void |
writeRow(int pos,
InternalRow value,
InternalRowSerializer serializer) |
void |
writeShort(int pos,
short value) |
void |
writeString(int pos,
BinaryString value) |
void |
writeTimestamp(int pos,
Timestamp value,
int precision) |
void reset()
void setNullAt(int pos)
void writeBoolean(int pos, boolean value)
void writeByte(int pos, byte value)
void writeShort(int pos, short value)
void writeInt(int pos, int value)
void writeLong(int pos, long value)
void writeFloat(int pos, float value)
void writeDouble(int pos, double value)
void writeString(int pos, BinaryString value)
void writeBinary(int pos, byte[] bytes)
void writeDecimal(int pos, Decimal value, int precision)
void writeTimestamp(int pos, Timestamp value, int precision)
void writeArray(int pos, InternalArray value, InternalArraySerializer serializer)
void writeMap(int pos, InternalMap value, InternalMapSerializer serializer)
void writeRow(int pos, InternalRow value, InternalRowSerializer serializer)
void complete()
@Deprecated static void write(BinaryWriter writer, int pos, Object o, DataType type, Serializer<?> serializer)
#createValueSetter(DataType)
for avoiding logical types during
runtime.static BinaryWriter.ValueSetter createValueSetter(DataType elementType)
elementType
- the element typestatic BinaryWriter.ValueSetter createValueSetter(DataType elementType, Serializer<?> serializer)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.