Top Description Constructors Methods
org.eclipse.jetty.http.compression

public Class NBitIntegerEncoder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer

Used to encode integers as described in RFC7541.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
encode(ByteBuffer
the buffer to encode into.
buffer
,
int
the prefix used to encode this long.
prefix
,
long
the long to encode into the buffer.
value
)

public static int

Returns:

the number of octets it would take to encode the long.
octetsNeeded
(int
the prefix used to encode this long.
prefix
,
long
the integer to encode.
value
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NBitIntegerEncoderback to summary
private NBitIntegerEncoder()

Method Detail

encodeback to summary
public static void encode(ByteBuffer buffer, int prefix, long value)
Parameters
buffer:ByteBuffer

the buffer to encode into.

prefix:int

the prefix used to encode this long.

value:long

the long to encode into the buffer.

octetsNeededback to summary
public static int octetsNeeded(int prefix, long value)
Parameters
prefix:int

the prefix used to encode this long.

value:long

the integer to encode.

Returns:int

the number of octets it would take to encode the long.