Package io.protostuff

Interface Output

All Known Subinterfaces:
StatefulOutput
All Known Implementing Classes:
FilterOutput, GraphProtostuffOutput, JsonOutput, JsonXOutput, KvpOutput, LowCopyProtobufOutput, LowCopyProtostuffOutput, ProtobufOutput, ProtostuffOutput, XmlOutput, XmlXOutput, YamlOutput

public interface Output
An Output lets an application write primitive data types and objects to a sink of data.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    writeBool(int fieldNumber, boolean value, boolean repeated)
    Writes a boolean field.
    void
    writeByteArray(int fieldNumber, byte[] value, boolean repeated)
    Writes a byte array field.
    void
    writeByteRange(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated)
    Writes a binary or a pre-encoded utf8 string.
    void
    writeBytes(int fieldNumber, ByteString value, boolean repeated)
    Writes a ByteString(wraps byte array) field.
    void
    writeBytes(int fieldNumber, ByteBuffer value, boolean repeated)
     
    void
    writeDouble(int fieldNumber, double value, boolean repeated)
    Writes a double field.
    void
    writeEnum(int fieldNumber, int value, boolean repeated)
    Writes a enum(its number) field.
    void
    writeFixed32(int fieldNumber, int value, boolean repeated)
    Writes a fixed int(4 bytes) field.
    void
    writeFixed64(int fieldNumber, long value, boolean repeated)
    Writes a fixed long(8 bytes) field.
    void
    writeFloat(int fieldNumber, float value, boolean repeated)
    Writes a float field.
    void
    writeInt32(int fieldNumber, int value, boolean repeated)
    Writes a variable int field.
    void
    writeInt64(int fieldNumber, long value, boolean repeated)
    Writes a variable long field.
    <T> void
    writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated)
    Writes an object(using its schema) field.
    void
    writeSFixed32(int fieldNumber, int value, boolean repeated)
    Writes a signed+fixed int(4 bytes) field.
    void
    writeSFixed64(int fieldNumber, long value, boolean repeated)
    Writes a signed+fixed long(8 bytes) field.
    void
    writeSInt32(int fieldNumber, int value, boolean repeated)
    Writes a signed int field.
    void
    writeSInt64(int fieldNumber, long value, boolean repeated)
    Writes a signed long field.
    void
    writeString(int fieldNumber, CharSequence value, boolean repeated)
    Writes a String field.
    void
    writeUInt32(int fieldNumber, int value, boolean repeated)
    Writes an unsigned int field.
    void
    writeUInt64(int fieldNumber, long value, boolean repeated)
    Writes an unsigned long field.
  • Method Details

    • writeInt32

      void writeInt32(int fieldNumber, int value, boolean repeated) throws IOException
      Writes a variable int field.
      Throws:
      IOException
    • writeUInt32

      void writeUInt32(int fieldNumber, int value, boolean repeated) throws IOException
      Writes an unsigned int field.
      Throws:
      IOException
    • writeSInt32

      void writeSInt32(int fieldNumber, int value, boolean repeated) throws IOException
      Writes a signed int field.
      Throws:
      IOException
    • writeFixed32

      void writeFixed32(int fieldNumber, int value, boolean repeated) throws IOException
      Writes a fixed int(4 bytes) field.
      Throws:
      IOException
    • writeSFixed32

      void writeSFixed32(int fieldNumber, int value, boolean repeated) throws IOException
      Writes a signed+fixed int(4 bytes) field.
      Throws:
      IOException
    • writeInt64

      void writeInt64(int fieldNumber, long value, boolean repeated) throws IOException
      Writes a variable long field.
      Throws:
      IOException
    • writeUInt64

      void writeUInt64(int fieldNumber, long value, boolean repeated) throws IOException
      Writes an unsigned long field.
      Throws:
      IOException
    • writeSInt64

      void writeSInt64(int fieldNumber, long value, boolean repeated) throws IOException
      Writes a signed long field.
      Throws:
      IOException
    • writeFixed64

      void writeFixed64(int fieldNumber, long value, boolean repeated) throws IOException
      Writes a fixed long(8 bytes) field.
      Throws:
      IOException
    • writeSFixed64

      void writeSFixed64(int fieldNumber, long value, boolean repeated) throws IOException
      Writes a signed+fixed long(8 bytes) field.
      Throws:
      IOException
    • writeFloat

      void writeFloat(int fieldNumber, float value, boolean repeated) throws IOException
      Writes a float field.
      Throws:
      IOException
    • writeDouble

      void writeDouble(int fieldNumber, double value, boolean repeated) throws IOException
      Writes a double field.
      Throws:
      IOException
    • writeBool

      void writeBool(int fieldNumber, boolean value, boolean repeated) throws IOException
      Writes a boolean field.
      Throws:
      IOException
    • writeEnum

      void writeEnum(int fieldNumber, int value, boolean repeated) throws IOException
      Writes a enum(its number) field.
      Throws:
      IOException
    • writeString

      void writeString(int fieldNumber, CharSequence value, boolean repeated) throws IOException
      Writes a String field.
      Throws:
      IOException
    • writeBytes

      void writeBytes(int fieldNumber, ByteString value, boolean repeated) throws IOException
      Writes a ByteString(wraps byte array) field.
      Throws:
      IOException
    • writeByteArray

      void writeByteArray(int fieldNumber, byte[] value, boolean repeated) throws IOException
      Writes a byte array field.
      Throws:
      IOException
    • writeByteRange

      void writeByteRange(boolean utf8String, int fieldNumber, byte[] value, int offset, int length, boolean repeated) throws IOException
      Writes a binary or a pre-encoded utf8 string.
      Throws:
      IOException
    • writeObject

      <T> void writeObject(int fieldNumber, T value, Schema<T> schema, boolean repeated) throws IOException
      Writes an object(using its schema) field.
      Throws:
      IOException
    • writeBytes

      void writeBytes(int fieldNumber, ByteBuffer value, boolean repeated) throws IOException
      Throws:
      IOException