public class GraphBinaryWriter extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
VERSION_BYTE |
Constructor and Description |
---|
GraphBinaryWriter() |
GraphBinaryWriter(TypeSerializerRegistry registry) |
Modifier and Type | Method and Description |
---|---|
<T> void |
write(T value,
ByteBuf buffer)
Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.
|
<T> void |
writeFullyQualifiedNull(Class<T> objectClass,
ByteBuf buffer,
Object information)
Represents a null value of a specific type, useful when the parent type contains a type parameter that must be
specified.
|
<T> void |
writeValue(T value,
ByteBuf buffer,
boolean nullable)
Writes a value without including type information.
|
void |
writeValueFlagNone(ByteBuf buffer)
Writes a single byte with value 0, representing an unset value_flag.
|
void |
writeValueFlagNull(ByteBuf buffer)
Writes a single byte representing the null value_flag.
|
public static final byte VERSION_BYTE
public GraphBinaryWriter()
public GraphBinaryWriter(TypeSerializerRegistry registry)
public <T> void writeValue(T value, ByteBuf buffer, boolean nullable) throws SerializationException
SerializationException
public <T> void write(T value, ByteBuf buffer) throws SerializationException
SerializationException
public <T> void writeFullyQualifiedNull(Class<T> objectClass, ByteBuf buffer, Object information) throws SerializationException
Note that for simple types, the provided information will be null
.
SerializationException
public void writeValueFlagNull(ByteBuf buffer)
public void writeValueFlagNone(ByteBuf buffer)
Copyright © 2013–2019 Apache Software Foundation. All rights reserved.