FileChecksum (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs, class: FileChecksum

Package org.apache.hadoop.fs

# Class FileChecksum

java.lang.Object
org.apache.hadoop.fs.FileChecksum

All Implemented Interfaces:
  `Writable`

@Public @Stable public abstract class FileChecksum extends Object implements Writable
An abstract class representing file checksums for files.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileChecksum()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object other)`
  Return true if both the algorithms and the values are the same.
  `abstract String`
  `getAlgorithmName()`
  The checksum algorithm name.
  `abstract byte[]`
  `getBytes()`
  The value of the checksum in bytes.
  `org.apache.hadoop.fs.Options.ChecksumOpt`
  `getChecksumOpt()`
  `abstract int`
  `getLength()`
  The length of the checksum in bytes.
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.hadoop.io.Writable

  `readFields, write`

- ## Constructor Details

  - ### FileChecksum

    public FileChecksum()

- ## Method Details

  - ### getAlgorithmName

    public abstract String getAlgorithmName()
    The checksum algorithm name.
    Returns:
      algorithm name.

  - ### getLength

    public abstract int getLength()
    The length of the checksum in bytes.
    Returns:
      length.

  - ### getBytes

    public abstract byte[] getBytes()
    The value of the checksum in bytes.
    Returns:
      byte array.

  - ### getChecksumOpt

    public org.apache.hadoop.fs.Options.ChecksumOpt getChecksumOpt()

  - ### equals

    public boolean equals(Object other)
    Return true if both the algorithms and the values are the same.
    Overrides:
      `equals` in class `Object`
    Parameters:
      `other` - other.
    Returns:
      if equal true, not false.

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`