Class GraphBinaryWriter
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.structure.io.binary.GraphBinaryWriter
 
- 
 public class GraphBinaryWriter extends Object Writes a value to a buffer using theTypeSerializerinstances configured in theTypeSerializerRegistry.This class exposes two different methods to write a value to a buffer: write(Object, Buffer)andwriteValue(Object, Buffer, boolean):- write()method writes the binary representation of the- {type_code}{type_info}{value_flag}{value}components.
- writeValue()method writes the- {value_flag}{value}when a value is nullable and only- {value}when a value is not nullable.
 
- 
- 
Field SummaryFields Modifier and Type Field Description static byteVERSION_BYTE
 - 
Constructor SummaryConstructors Constructor Description GraphBinaryWriter()GraphBinaryWriter(TypeSerializerRegistry registry)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidwrite(T value, Buffer buffer)Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.<T> voidwriteFullyQualifiedNull(Class<T> objectClass, Buffer 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> voidwriteValue(T value, Buffer buffer, boolean nullable)Writes a value without including type information.voidwriteValueFlagNone(Buffer buffer)Writes a single byte with value 0, representing an unset value_flag.voidwriteValueFlagNull(Buffer buffer)Writes a single byte representing the null value_flag.
 
- 
- 
- 
Field Detail- 
VERSION_BYTEpublic static final byte VERSION_BYTE - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
GraphBinaryWriterpublic GraphBinaryWriter() 
 - 
GraphBinaryWriterpublic GraphBinaryWriter(TypeSerializerRegistry registry) 
 
- 
 - 
Method Detail- 
writeValuepublic <T> void writeValue(T value, Buffer buffer, boolean nullable) throws IOExceptionWrites a value without including type information.- Throws:
- IOException
 
 - 
writepublic <T> void write(T value, Buffer buffer) throws IOExceptionWrites an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.- Throws:
- IOException
 
 - 
writeFullyQualifiedNullpublic <T> void writeFullyQualifiedNull(Class<T> objectClass, Buffer buffer, Object information) throws IOException Represents a null value of a specific type, useful when the parent type contains a type parameter that must be specified.Note that for simple types, the provided information will be null.- Throws:
- IOException
 
 - 
writeValueFlagNullpublic void writeValueFlagNull(Buffer buffer) Writes a single byte representing the null value_flag.
 - 
writeValueFlagNonepublic void writeValueFlagNone(Buffer buffer) Writes a single byte with value 0, representing an unset value_flag.
 
- 
 
-