Class InternalNode


  • class InternalNode
    extends Node
    This class represents an internal node of a huffman tree. It contains two child nodes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int depth  
      private Node one  
      private Node zero  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected InternalNode()  
      protected InternalNode​(int depth)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void append​(HuffmanTable.Code c)  
      protected long decode​(javax.imageio.stream.ImageInputStream iis)  
      private void pad​(java.lang.StringBuilder sb)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • depth

        private final int depth
      • zero

        private Node zero
      • one

        private Node one
    • Constructor Detail

      • InternalNode

        protected InternalNode()
      • InternalNode

        protected InternalNode​(int depth)
    • Method Detail

      • decode

        protected long decode​(javax.imageio.stream.ImageInputStream iis)
                       throws java.io.IOException
        Specified by:
        decode in class Node
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • pad

        private void pad​(java.lang.StringBuilder sb)