Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.protobuf

public Class ProtobufUtil

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final int
public static final int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public 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.

public static int
appendLengthLength(int len, byte[] buffer, int ptr)

Note

caller MUST ensure buffer has room for at least 5 bytes

public static byte[]
lengthAsBytes(int len)

public static int
lengthLength(int len)

public static int
zigzagDecode(int encoded)

public static long
zigzagDecode(long encoded)

public static int
zigzagEncode(int input)

public static long
zigzagEncode(long input)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SECONDARY_BUFFER_LENGTHback to summary
public static final int SECONDARY_BUFFER_LENGTH
sUtf8UnitLengthsback to summary
public static final int[] sUtf8UnitLengths

Constructor Detail

ProtobufUtilback to summary
public ProtobufUtil()

Method Detail

allocSecondaryback to summary
public 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.

appendLengthLengthback to summary
public static int appendLengthLength(int len, byte[] buffer, int ptr)

Note

caller MUST ensure buffer has room for at least 5 bytes

lengthAsBytesback to summary
public static byte[] lengthAsBytes(int len)
lengthLengthback to summary
public static int lengthLength(int len)
zigzagDecodeback to summary
public static int zigzagDecode(int encoded)
zigzagDecodeback to summary
public static long zigzagDecode(long encoded)
zigzagEncodeback to summary
public static int zigzagEncode(int input)
zigzagEncodeback to summary
public static long zigzagEncode(long input)