Class JPEGHuffmanTable


final class JPEGHuffmanTable extends JPEGVariableSizeSegment
JPEGHuffmanTable class actually represents two types of object: 1) A DHT (Define Huffman Tables) segment, which may represent as many as 4 Huffman tables. In this case, the tables are stored in the allTables array. 2) A single Huffman table. In this case, the allTables array will be null. The 'reference' field is stored in both types of object, but 'initialize' is only called if the object represents a DHT.
  • Field Details

    • allTables

      JPEGHuffmanTable[] allTables
    • tableClass

      int tableClass
    • tableIdentifier

      int tableIdentifier
    • dhMaxCodes

      int[] dhMaxCodes
    • dhMinCodes

      int[] dhMinCodes
    • dhValPtrs

      int[] dhValPtrs
    • dhValues

      int[] dhValues
    • ehCodes

      int[] ehCodes
    • ehCodeLengths

      byte[] ehCodeLengths
    • DCLuminanceTable

      static byte[] DCLuminanceTable
    • DCChrominanceTable

      static byte[] DCChrominanceTable
    • ACLuminanceTable

      static byte[] ACLuminanceTable
    • ACChrominanceTable

      static byte[] ACChrominanceTable
  • Constructor Details

    • JPEGHuffmanTable

      public JPEGHuffmanTable(byte[] reference)
    • JPEGHuffmanTable

      public JPEGHuffmanTable(LEDataInputStream byteStream)
  • Method Details

    • getAllTables

      public JPEGHuffmanTable[] getAllTables()
    • getDefaultACChrominanceTable

      public static JPEGHuffmanTable getDefaultACChrominanceTable()
    • getDefaultACLuminanceTable

      public static JPEGHuffmanTable getDefaultACLuminanceTable()
    • getDefaultDCChrominanceTable

      public static JPEGHuffmanTable getDefaultDCChrominanceTable()
    • getDefaultDCLuminanceTable

      public static JPEGHuffmanTable getDefaultDCLuminanceTable()
    • getDhMaxCodes

      public int[] getDhMaxCodes()
    • getDhMinCodes

      public int[] getDhMinCodes()
    • getDhValPtrs

      public int[] getDhValPtrs()
    • getDhValues

      public int[] getDhValues()
    • getTableClass

      public int getTableClass()
    • getTableIdentifier

      public int getTableIdentifier()
    • initialize

      void initialize()
    • signature

      public int signature()
      Overrides:
      signature in class JPEGSegment