use of io.protostuff.LinkedBuffer in project incubator-servicecomb-java-chassis by apache.
the class Protostuff method serialize.
@Override
public byte[] serialize(Object model) throws IOException {
LinkedBuffer linkedBuffer = LinkedBuffer.allocate();
ProtobufOutput output = new ProtobufOutput(linkedBuffer);
if (model != null) {
rootSchema.writeTo(output, (Root) model);
}
return output.toByteArray();
}
Aggregations