Interface FileHash


public interface FileHash
An interface representing the hash of a file.

DirectoryWatcher uses the equals() method on the member classes of this interface to determine if the content of a file has changed.

  • Field Summary

    Fields
    Modifier and Type Field Description
    static FileHash DIRECTORY
    A special hash instance used by DirectoryWatcher to represent a directory
  • Method Summary

    Modifier and Type Method Description
    byte[] asBytes()  
    default java.lang.String asString()  
    static FileHash directory()  
    static FileHash fromBytes​(byte[] value)  
    static FileHash fromLong​(long value)  
  • Field Details

    • DIRECTORY

      static final FileHash DIRECTORY
      A special hash instance used by DirectoryWatcher to represent a directory
  • Method Details

    • fromBytes

      static FileHash fromBytes​(byte[] value)
    • fromLong

      static FileHash fromLong​(long value)
    • directory

      static FileHash directory()
    • asString

      default java.lang.String asString()
      Returns:
      A representation of this hash as a human-readable string
    • asBytes

      byte[] asBytes()
      Returns:
      a representation of this hash as a byte array.