Class NBitIntegerEncoder
- java.lang.Object
-
- org.eclipse.jetty.http.compression.NBitIntegerEncoder
-
public class NBitIntegerEncoder extends java.lang.ObjectUsed to encode integers as described in RFC7541.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidencode(java.nio.ByteBuffer buffer, int prefix, long value)static intoctetsNeeded(int prefix, long value)
-
-
-
Method Detail
-
octetsNeeded
public static int octetsNeeded(int prefix, long value)- Parameters:
prefix- the prefix used to encode this long.value- the integer to encode.- Returns:
- the number of octets it would take to encode the long.
-
encode
public static void encode(java.nio.ByteBuffer buffer, int prefix, long value)- Parameters:
buffer- the buffer to encode into.prefix- the prefix used to encode this long.value- the long to encode into the buffer.
-
-