public class ProtobufUtil extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static int | SECONDARY_BUFFER_LENGTH | 
| static int[] | sUtf8UnitLengths | 
| Constructor and Description | 
|---|
| ProtobufUtil() | 
| Modifier and Type | Method and Description | 
|---|---|
| static byte[] | allocSecondary(byte[] curr)While we could get all fancy on allocating secondary buffer (after
 initial one), let's start with very simple strategy of medium-length
 buffer. | 
| static int | appendLengthLength(int len,
                  byte[] buffer,
                  int ptr)NOTE: caller MUST ensure buffer has room for at least 5 bytes | 
| static byte[] | lengthAsBytes(int len) | 
| static int | lengthLength(int len) | 
| static int | zigzagDecode(int encoded) | 
| static long | zigzagDecode(long encoded) | 
| static int | zigzagEncode(int input) | 
| static long | zigzagEncode(long input) | 
public static final int SECONDARY_BUFFER_LENGTH
public static final int[] sUtf8UnitLengths
public static byte[] allocSecondary(byte[] curr)
public static int lengthLength(int len)
public static int appendLengthLength(int len,
                     byte[] buffer,
                     int ptr)
public static byte[] lengthAsBytes(int len)
public static int zigzagEncode(int input)
public static int zigzagDecode(int encoded)
public static long zigzagEncode(long input)
public static long zigzagDecode(long encoded)
Copyright © 2017 FasterXML. All rights reserved.