Class CRC16

  • All Implemented Interfaces:
    java.util.zip.Checksum

    public class CRC16
    extends java.lang.Object
    implements java.util.zip.Checksum
    Crc16: Calculate 16-bit Cyclic Redundancy Check. License: GPL, incorporated by reference.
    • Constructor Summary

      Constructors 
      Constructor Description
      CRC16()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int[] getTable()  
      long getValue()  
      void reset()  
      void update​(byte[] b)
      Update 16-bit CRC.
      void update​(byte[] b, int off, int len)
      Update 16-bit CRC.
      void update​(int b)
      Update 16-bit CRC.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.zip.Checksum

        update
    • Constructor Detail

      • CRC16

        public CRC16()
    • Method Detail

      • getTable

        public static int[] getTable()
      • getValue

        public long getValue()
        Specified by:
        getValue in interface java.util.zip.Checksum
      • reset

        public void reset()
        Specified by:
        reset in interface java.util.zip.Checksum
      • update

        public void update​(int b)
        Update 16-bit CRC.
        Specified by:
        update in interface java.util.zip.Checksum
        Parameters:
        b - input byte
      • update

        public void update​(byte[] b)
        Update 16-bit CRC.
        Specified by:
        update in interface java.util.zip.Checksum
        Parameters:
        b - input byte array
      • update

        public void update​(byte[] b,
                           int off,
                           int len)
        Update 16-bit CRC.
        Specified by:
        update in interface java.util.zip.Checksum
        Parameters:
        b - input byte array
        off - starting offset to data
        len - number of bytes to process