Example usage for org.apache.thrift.protocol TCompactProtocol writeI32

List of usage examples for org.apache.thrift.protocol TCompactProtocol writeI32

Introduction

In this page you can find the example usage for org.apache.thrift.protocol TCompactProtocol writeI32.

Prototype

public void writeI32(int i32) throws TException 

Source Link

Document

Write an i32 as a zigzag varint.

Usage

From source file:com.baidu.oped.apm.common.util.BytesUtilsTest.java

License:Apache License

private TMemoryBuffer writeVInt32(int i) throws TException {
    TMemoryBuffer tMemoryBuffer = new TMemoryBuffer(10);
    TCompactProtocol tCompactProtocol = new TCompactProtocol(tMemoryBuffer);
    tCompactProtocol.writeI32(i);
    return tMemoryBuffer;
}