Interface SerialSink


public interface SerialSink
Where a codec writes one object's field values.

Implemented by the writer and called by generated code. The order of the calls is the order of the bytes, and the generator emits them in the order the format fixes, so nothing here decides layout.

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    writeBoolean(boolean value)
     
    void
    writeByte(byte value)
     
    void
    writeChar(char value)
     
    void
    writeDouble(double value)
     
    void
    writeFloat(float value)
     
    void
    writeInt(int value)
     
    void
    writeLong(long value)
     
    void
    Writes a reference: null, a string, a boxed primitive, an array, an enum constant, or another type with a codec.
    void
    writeShort(short value)
     
  • Method Details

    • writeBoolean

      void writeBoolean(boolean value)
      Parameters:
      value - the value
    • writeByte

      void writeByte(byte value)
      Parameters:
      value - the value
    • writeChar

      void writeChar(char value)
      Parameters:
      value - the value
    • writeShort

      void writeShort(short value)
      Parameters:
      value - the value
    • writeInt

      void writeInt(int value)
      Parameters:
      value - the value
    • writeLong

      void writeLong(long value)
      Parameters:
      value - the value
    • writeFloat

      void writeFloat(float value)
      Parameters:
      value - the value
    • writeDouble

      void writeDouble(double value)
      Parameters:
      value - the value
    • writeObject

      void writeObject(Object value)
      Writes a reference: null, a string, a boxed primitive, an array, an enum constant, or another type with a codec.

      An object already written in this stream is written as a reference to it, so a graph that shares or cycles comes back sharing and cycling.

      Parameters:
      value - the value, which may be null