Package io.methvin.watcher.hashing
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods 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 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.
-
-