mirror of
https://github.com/revanced/ARSCLib.git
synced 2025-05-02 15:14:26 +02:00
read bytes fully
This commit is contained in:
parent
dbfb08700f
commit
09268d178b
@ -110,9 +110,16 @@ public abstract class BlockItem extends Block {
|
|||||||
if(bts==null || bts.length==0){
|
if(bts==null || bts.length==0){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
int readLength = inputStream.read(bts, 0, bts.length);
|
int length=bts.length;
|
||||||
|
int offset=0;
|
||||||
|
int read=length;
|
||||||
|
while (length>0 && read>0){
|
||||||
|
read = inputStream.read(bts, offset, length);
|
||||||
|
length-=read;
|
||||||
|
offset+=read;
|
||||||
|
}
|
||||||
onBytesChanged();
|
onBytesChanged();
|
||||||
super.notifyBlockLoad();
|
super.notifyBlockLoad();
|
||||||
return readLength;
|
return bts.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user