mirror of
https://github.com/Maschell/JNUSTool.git
synced 2024-06-02 15:38:47 +02:00
85f87c57bb
- Decryption from files - Decryption to new folder structures - updates csv with version numbers - download and decrypt different versions (gui only)
33 lines
657 B
Java
33 lines
657 B
Java
package de.mas.jnustool;
|
|
|
|
import java.util.concurrent.Callable;
|
|
|
|
public class FEntryDownloader implements Callable<Integer>
|
|
{
|
|
FEntry f;
|
|
Progress progress = null;
|
|
public void setTitle(FEntry f){
|
|
this.f = f;
|
|
}
|
|
public FEntryDownloader(FEntry f,Progress fatherProgress){
|
|
setTitle(f);
|
|
createProgressListener(fatherProgress);
|
|
}
|
|
|
|
|
|
private void createProgressListener(Progress fatherProgress) {
|
|
if(fatherProgress != null){
|
|
progress = new Progress();
|
|
fatherProgress.add(progress);
|
|
progress.addTotal(f.getFileLength());
|
|
|
|
}
|
|
}
|
|
@Override
|
|
public Integer call() throws Exception {
|
|
f.downloadAndDecrypt(progress);
|
|
return null;
|
|
}
|
|
|
|
}
|