Class HuffmanDecoder


  • public class HuffmanDecoder
    extends java.lang.Object

    Used to decoded Huffman encoded strings.

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

    • Constructor Summary

      Constructors 
      Constructor Description
      HuffmanDecoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decode​(java.nio.ByteBuffer buffer)  
      void reset()  
      void setLength​(int length)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HuffmanDecoder

        public HuffmanDecoder()
    • Method Detail

      • setLength

        public void setLength​(int length)
        Parameters:
        length - in bytes of the huffman data.
      • decode

        public java.lang.String decode​(java.nio.ByteBuffer buffer)
                                throws EncodingException
        Parameters:
        buffer - the buffer containing the Huffman encoded bytes.
        Returns:
        the decoded String.
        Throws:
        EncodingException - if the huffman encoding is invalid.
      • reset

        public void reset()