Package pro.gravit.launcher.hasher
Class HashedFile
- java.lang.Object
-
- pro.gravit.launcher.serialize.stream.StreamObject
-
- pro.gravit.launcher.hasher.HashedEntry
-
- pro.gravit.launcher.hasher.HashedFile
-
public final class HashedFile extends HashedEntry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class pro.gravit.launcher.hasher.HashedEntry
HashedEntry.Type
-
Nested classes/interfaces inherited from class pro.gravit.launcher.serialize.stream.StreamObject
StreamObject.Adapter<O extends StreamObject>
-
-
Field Summary
Fields Modifier and Type Field Description static SecurityHelper.DigestAlgorithmDIGEST_ALGOlongsize-
Fields inherited from class pro.gravit.launcher.hasher.HashedEntry
flag
-
-
Constructor Summary
Constructors Constructor Description HashedFile(long size, byte[] digest)HashedFile(java.nio.file.Path file, long size, boolean digest)HashedFile(HInput input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HashedEntry.TypegetType()booleanisSame(java.nio.file.Path file, boolean digest)booleanisSame(HashedFile o)booleanisSameDigest(byte[] digest)longsize()voidwrite(HOutput output)-
Methods inherited from class pro.gravit.launcher.serialize.stream.StreamObject
write
-
-
-
-
Field Detail
-
DIGEST_ALGO
public static final SecurityHelper.DigestAlgorithm DIGEST_ALGO
-
size
public final long size
-
-
Constructor Detail
-
HashedFile
public HashedFile(HInput input) throws java.io.IOException
- Throws:
java.io.IOException
-
HashedFile
public HashedFile(long size, byte[] digest)
-
HashedFile
public HashedFile(java.nio.file.Path file, long size, boolean digest) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
getType
public HashedEntry.Type getType()
- Specified by:
getTypein classHashedEntry
-
isSame
public boolean isSame(HashedFile o)
-
isSame
public boolean isSame(java.nio.file.Path file, boolean digest) throws java.io.IOException- Throws:
java.io.IOException
-
isSameDigest
public boolean isSameDigest(byte[] digest)
-
size
public long size()
- Specified by:
sizein classHashedEntry
-
write
public void write(HOutput output) throws java.io.IOException
- Specified by:
writein classStreamObject- Throws:
java.io.IOException
-
-