Class CRC


  • final class CRC
    extends java.lang.Object
    A simple class the hold and calculate the cyclic redundancy check (CRC) for sanity checking of the data.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int crc  
      private static int[] CRC32_TABLE  
      private static int DEFAULT  
    • Constructor Summary

      Constructors 
      Constructor Description
      CRC()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private int compute​(int baseCrc, int inCh)  
      (package private) int getValue()  
      (package private) void reset()  
      (package private) void update​(int inCh)  
      (package private) void update​(int inCh, int repeat)  
      • Methods inherited from class java.lang.Object

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

      • CRC32_TABLE

        private static final int[] CRC32_TABLE
      • crc

        private int crc
    • Constructor Detail

      • CRC

        CRC()
    • Method Detail

      • compute

        private int compute​(int baseCrc,
                            int inCh)
      • getValue

        int getValue()
      • reset

        void reset()
      • update

        void update​(int inCh)
      • update

        void update​(int inCh,
                    int repeat)