Add default readFileToStream function wthout offset/size

This commit is contained in:
Maschell 2019-05-04 11:11:36 +02:00
parent 156fcd02df
commit 0ed359a43a
2 changed files with 5 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public final class DecryptionService {
}
public void decryptFSTEntryToStream(FSTEntry entry, OutputStream outputStream) throws IOException {
dataProvider.readFileToStream(outputStream, entry, 0);
dataProvider.readFileToStream(outputStream, entry);
}
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -62,6 +62,10 @@ public interface FSTDataProvider {
return in;
}
default public boolean readFileToStream(OutputStream out, FSTEntry entry) throws IOException {
return readFileToStream(out, entry, 0, entry.getFileSize());
}
default public boolean readFileToStream(OutputStream out, FSTEntry entry, long offset) throws IOException {
return readFileToStream(out, entry, offset, entry.getFileSize());
}