Package one.proto
Class Proto
java.lang.Object
one.proto.Proto
Simplified implementation of Protobuf writer, capable of encoding
varints, doubles, ASCII strings and embedded messages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]buffer()field(int index, byte[] bytes) field(int index, double d) field(int index, int n) field(int index, long n) voidreset()intsize()voidwriteBytes(byte[] bytes, int offset, int length) voidwriteDouble(double d) voidwriteInt(int n) voidwriteLong(long n) void
-
Constructor Details
-
Proto
public Proto(int capacity)
-
-
Method Details
-
buffer
public byte[] buffer() -
size
public int size() -
reset
public void reset() -
field
-
field
-
field
-
field
-
field
-
field
-
writeInt
public void writeInt(int n) -
writeLong
public void writeLong(long n) -
writeDouble
public void writeDouble(double d) -
writeString
-
writeBytes
public void writeBytes(byte[] bytes, int offset, int length)
-