Top Description Inners Constructors Methods
jdk.internal.net.http.hpack

public final Class Huffman

extends Object
Class Inheritance
Imports
java.io.IOException, java.nio.ByteBuffer

Huffman coding.
Since
9

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
public static interface

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Huffmanback to summary
public Huffman()
jdk.internal.net.http.hpack back to summary

public Interface Huffman.Reader

Known Direct Implementers
jdk.internal.net.http.hpack.NaiveHuffman.Reader, jdk.internal.net.http.hpack.QuickHuffman.Reader

Method Summary

Modifier and TypeMethod and Description
public void
read(ByteBuffer source, Appendable destination, boolean isLast)

public void
reset()

Brings this reader to the state it had upon construction.

Method Detail

readback to summary
public void read(ByteBuffer source, Appendable destination, boolean isLast) throws IOException
resetback to summary
public void reset()

Brings this reader to the state it had upon construction.

jdk.internal.net.http.hpack back to summary

public Interface Huffman.Writer

Known Direct Implementers
jdk.internal.net.http.hpack.NaiveHuffman.Writer, jdk.internal.net.http.hpack.QuickHuffman.Writer

Method Summary

Modifier and TypeMethod and Description
public Huffman.Writer
from(CharSequence input, int start, int end)

public int

Returns:

number of bytes
lengthOf
(CharSequence
characters
value
,
int
the start index, inclusive
start
,
int
the end index, exclusive
end
)

Calculates the number of bytes required to represent a subsequence of the given CharSequence using the Huffman coding.

public default int
public Huffman.Writer

Returns:

this writer
reset
()

Brings this writer to the state it had upon construction.

public boolean
write(ByteBuffer destination)

Method Detail

fromback to summary
public Huffman.Writer from(CharSequence input, int start, int end)
lengthOfback to summary
public int lengthOf(CharSequence value, int start, int end)

Calculates the number of bytes required to represent a subsequence of the given CharSequence using the Huffman coding.

Parameters
value:CharSequence

characters

start:int

the start index, inclusive

end:int

the end index, exclusive

Returns:int

number of bytes

Exceptions
NullPointerException:
if the value is null
IndexOutOfBoundsException:
if any invocation of value.charAt(i), where start <= i < end, throws an IndexOutOfBoundsException
lengthOfback to summary
public default int lengthOf(CharSequence value)
resetback to summary
public Huffman.Writer reset()

Brings this writer to the state it had upon construction.

Returns:Huffman.Writer

this writer

writeback to summary
public boolean write(ByteBuffer destination)