Class ChecksumType<C extends Checksum>
java.lang.Object
dev.latvian.mods.klib.io.checksum.ChecksumType<C>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Cdigest(byte[] input) digest(byte[] input, int offset, int len) final Cdigest(FileInfo fileInfo, @Nullable LongConsumer callback) digest(Path file, long offset, long size, @Nullable LongConsumer callback) final Cdigest(Path file, @Nullable LongConsumer callback) of(byte[] bytes) toString()static ChecksumType<?> typeOf(int id)
-
Field Details
-
TYPES
-
id
public final int id -
name
-
algorithm
-
nil
-
size
public final int size -
fromBytes
-
codec
-
streamCodec
-
-
Constructor Details
-
ChecksumType
-
-
Method Details
-
typeOf
-
of
-
of
-
digest
- Throws:
IOException
-
digest
public final C digest(FileInfo fileInfo, @Nullable @Nullable LongConsumer callback) throws IOException - Throws:
IOException
-
digest
public C digest(Path file, long offset, long size, @Nullable @Nullable LongConsumer callback) throws IOException - Throws:
IOException
-
digest
-
digest
-
read
- Throws:
IOException
-
toString
-