org.apache.tinkerpop.gremlin.driver.ser.binary

## Class GraphBinaryWriter

- java.lang.Object
- - org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryWriter

-     public class GraphBinaryWriter
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphBinaryWriter()`
    `GraphBinaryWriter(TypeSerializerRegistry registry)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ByteBuf` | `getValueFlagNone()` Gets a buffer containing a single byte with value 0, representing an unset value_flag.
    `ByteBuf` | `getValueFlagNull()` Gets a buffer containing a single byte representing the null value_flag.
    `<T> ByteBuf` | `write(T value, ByteBufAllocator allocator)` Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.
    `<T> ByteBuf` | `writeFullyQualifiedNull(Class<T> objectClass, ByteBufAllocator allocator, Object information)` Represents a null value of a specific type, useful when the parent type contains a type parameter that must be specified.
    `<T> ByteBuf` | `writeValue(T value, ByteBufAllocator allocator, boolean nullable)` Writes a value without including type information.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphBinaryWriter

          public GraphBinaryWriter()

    - #### GraphBinaryWriter

          public GraphBinaryWriter(TypeSerializerRegistry registry)

  - ### Method Detail

    - #### writeValue

          public <T> ByteBuf writeValue(T value,
                                        ByteBufAllocator allocator,
                                        boolean nullable)
                                 throws SerializationException

      Writes a value without including type information.
      Throws:
        `SerializationException`

    - #### write

          public <T> ByteBuf write(T value,
                                   ByteBufAllocator allocator)
                            throws SerializationException

      Writes an object in fully-qualified format, containing {type_code}{type_info}{value_flag}{value}.
      Throws:
        `SerializationException`

    - #### writeFullyQualifiedNull

          public <T> ByteBuf writeFullyQualifiedNull(Class<T> objectClass,
                                                     ByteBufAllocator allocator,
                                                     Object information)
                                              throws SerializationException

      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:
        `SerializationException`

    - #### getValueFlagNull

          public ByteBuf getValueFlagNull()

      Gets a buffer containing a single byte representing the null value_flag.

    - #### getValueFlagNone

          public ByteBuf getValueFlagNone()

      Gets a buffer containing a single byte with value 0, representing an unset value_flag.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.