mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-25 17:36:55 +01:00
Throw an exception if the inputstream couldn't deliver all the needed bytes
This commit is contained in:
parent
3296b1befe
commit
e461e78313
@ -189,6 +189,9 @@ public class NUSDecryption extends AESDecryption {
|
|||||||
} finally {
|
} finally {
|
||||||
StreamUtils.closeAll(inputStream, outputStream);
|
StreamUtils.closeAll(inputStream, outputStream);
|
||||||
}
|
}
|
||||||
|
if(written < filesize) {
|
||||||
|
throw new IOException("Failed to read. Missing " + (filesize - written));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void decryptFileStreamHashed(InputStream inputStream, OutputStream outputStream, long fileoffset, long filesize, short contentIndex, byte[] h3Hash)
|
public void decryptFileStreamHashed(InputStream inputStream, OutputStream outputStream, long fileoffset, long filesize, short contentIndex, byte[] h3Hash)
|
||||||
|
Loading…
Reference in New Issue
Block a user