Class Huffman
java.lang.Object
org.glassfish.grizzly.http2.hpack.Huffman
Huffman coding table.
Instances of this class are safe for use by multiple threads.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintlengthOf(CharSequence value) Calculates the number of bytes required to represent the givenCharSequencewith the Huffman coding.intlengthOf(CharSequence value, int start, int end) Calculates the number of bytes required to represent a sub-sequence of the givenCharSequencewith the Huffman coding.
-
Field Details
-
INSTANCE
Shared instance.
-
-
Method Details
-
lengthOf
Calculates the number of bytes required to represent the givenCharSequencewith the Huffman coding.- Parameters:
value- characters- Returns:
- number of bytes
- Throws:
NullPointerException- if the value is null
-
lengthOf
Calculates the number of bytes required to represent a sub-sequence of the givenCharSequencewith the Huffman coding.- Parameters:
value- charactersstart- the start index, inclusiveend- the end index, exclusive- Returns:
- number of bytes
- Throws:
NullPointerException- if the value is nullIndexOutOfBoundsException- if any invocation ofvalue.charAt(i), wherestart <= i < endwould throw an IndexOutOfBoundsException
-