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 Detail

      • DIRECTORY

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

      • 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.