mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-01 14:44:27 +02:00
fix read bytes fully
This commit is contained in:
parent
6273ae33ec
commit
14eb36d3b4
@ -64,10 +64,10 @@ public class AnyHeader extends HeaderBlock{
|
||||
byte[] buffer = new byte[chunkSize];
|
||||
int length = chunkSize - headerSize;
|
||||
int offset = loadHeaderBytes(buffer);
|
||||
int readLength = inputStream.read(buffer, offset, length);
|
||||
if(readLength < length){
|
||||
throw new IOException("Read length is less than expected: length="
|
||||
+chunkSize+", read="+readLength);
|
||||
while (length>0){
|
||||
int len = inputStream.read(buffer, offset, length);
|
||||
length=length-len;
|
||||
offset=offset+len;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user