Class Proto

java.lang.Object
one.proto.Proto

public class Proto extends Object
Simplified implementation of Protobuf writer, capable of encoding varints, doubles, ASCII strings and embedded messages
  • Constructor Details

    • Proto

      public Proto(int capacity)
  • Method Details

    • buffer

      public byte[] buffer()
    • size

      public int size()
    • reset

      public void reset()
    • field

      public Proto field(int index, int n)
    • field

      public Proto field(int index, long n)
    • field

      public Proto field(int index, double d)
    • field

      public Proto field(int index, String s)
    • field

      public Proto field(int index, byte[] bytes)
    • field

      public Proto field(int index, Proto proto)
    • startField

      public int startField(int index)
    • commitField

      public void commitField(int mark)
    • writeInt

      public void writeInt(int n)
    • writeLong

      public void writeLong(long n)
    • writeDouble

      public void writeDouble(double d)
    • writeBytes

      public void writeBytes(byte[] bytes, int offset, int length)