IT. Expert System.

Java Standard Edition (SE)

CRC32


compact1, compact2, compact3
java.util.zip

Class CRC32

  • All Implemented Interfaces:
    Checksum


    public class CRC32
    extends Object
    implements Checksum
    A class that can be used to compute the CRC-32 of a data stream.

    Passing a null argument to a method in this class will cause a NullPointerException to be thrown.

    See Also:
    Checksum
    • Constructor Summary

      Constructors 
      Constructor and Description
      CRC32()
      Creates a new CRC32 object.
    • Constructor Detail

      • CRC32

        public CRC32()
        Creates a new CRC32 object.
    • Method Detail

      • update

        public void update(int b)
        Updates the CRC-32 checksum with the specified byte (the low eight bits of the argument b).
        Specified by:
        update in interface Checksum
        Parameters:
        b - the byte to update the checksum with
      • update

        public void update(byte[] b,
                           int off,
                           int len)
        Updates the CRC-32 checksum with the specified array of bytes.
        Specified by:
        update in interface Checksum
        Parameters:
        b - the byte array to update the checksum with
        off - the start offset of the data
        len - the number of bytes to use for the update
        Throws:
        ArrayIndexOutOfBoundsException - if off is negative, or len is negative, or off+len is greater than the length of the array b
      • update

        public void update(byte[] b)
        Updates the CRC-32 checksum with the specified array of bytes.
        Parameters:
        b - the array of bytes to update the checksum with
      • update

        public void update(ByteBuffer buffer)
        Updates the checksum with the bytes from the specified buffer. The checksum is updated using buffer.remaining() bytes starting at buffer.position() Upon return, the buffer's position will be updated to its limit; its limit will not have been changed.
        Parameters:
        buffer - the ByteBuffer to update the checksum with
        Since:
        1.8
      • reset

        public void reset()
        Resets CRC-32 to initial value.
        Specified by:
        reset in interface Checksum
      • getValue

        public long getValue()
        Returns CRC-32 value.
        Specified by:
        getValue in interface Checksum
        Returns:
        the current checksum value


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 171 / 158702065. Delta: 0.04666 с