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

public Class HuffmanDecoder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, org.eclipse.jetty.http.HttpTokens, org.eclipse.jetty.util.CharsetStringBuilder

Used to decoded Huffman encoded strings.

Characters which are illegal field-vchar values are replaced with either ' ' or '?' as described in RFC9110

Field Summary

Modifier and TypeField and Description
private int
private final CharsetStringBuilder.Iso88591StringBuilder
private int
private int
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the decoded String.
decode
(ByteBuffer
the buffer containing the Huffman encoded bytes.
buffer
)

public void
public void
setLength(int
in bytes of the huffman data.
length
)

Set in bytes of the huffman data..

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_bitsback to summary
private int _bits
_builderback to summary
private final CharsetStringBuilder.Iso88591StringBuilder _builder
_countback to summary
private int _count
_currentback to summary
private int _current
_lengthback to summary
private int _length
_nodeback to summary
private int _node

Constructor Detail

HuffmanDecoderback to summary
public HuffmanDecoder()

Method Detail

decodeback to summary
public String decode(ByteBuffer buffer) throws EncodingException
Parameters
buffer:ByteBuffer

the buffer containing the Huffman encoded bytes.

Returns:String

the decoded String.

Exceptions
EncodingException:
if the huffman encoding is invalid.
resetback to summary
public void reset()
setLengthback to summary
public void setLength(int length)

Set in bytes of the huffman data..

Parameters
length:int

in bytes of the huffman data.