mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-06-05 13:57:00 +03:00
[FEATURE] Add url to HashedFile
This commit is contained in:
parent
c65e20d77b
commit
88fa3ca1a0
1 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,8 @@ public final class HashedFile extends HashedEntry {
|
|||
public final long size;
|
||||
@LauncherNetworkAPI
|
||||
private final byte[] digest;
|
||||
@LauncherNetworkAPI
|
||||
public final String url;
|
||||
|
||||
|
||||
public HashedFile(HInput input) throws IOException {
|
||||
|
@ -30,6 +32,13 @@ public HashedFile(HInput input) throws IOException {
|
|||
public HashedFile(long size, byte[] digest) {
|
||||
this.size = VerifyHelper.verifyLong(size, VerifyHelper.L_NOT_NEGATIVE, "Illegal size: " + size);
|
||||
this.digest = digest == null ? null : DIGEST_ALGO.verify(digest).clone();
|
||||
this.url = null;
|
||||
}
|
||||
|
||||
public HashedFile(long size, byte[] digest, String url) {
|
||||
this.size = VerifyHelper.verifyLong(size, VerifyHelper.L_NOT_NEGATIVE, "Illegal size: " + size);
|
||||
this.digest = digest == null ? null : DIGEST_ALGO.verify(digest).clone();
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue