private static int readLen(ByteBuffer buffer) {
        int len = 0;
        int i = Buffers.readUByte(buffer);
        if ((i & 0x80) != 0) {
            //read one more byte.
            len |= (i & 0x7f) << 7;
            len += Buffers.readUByte(buffer);
        } else {
            len = i;
        }
        return len;
    }
read encoding len.
see StringPool.cpp ENCODE_LENGTH
replugin-host-library/replugin-host-lib/src/main/java/com/qihoo360/replugin/ext/parser/utils/ParseUtils.java